/
opt
/
alt
/
python37
/
lib64
/
python3.7
/
site-packages
/
numpy
/
core
/
tests
/
/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/tests
mkdir
upload
Name
Size
Mode
Actions
data/
-
0755
rm
__pycache__/
-
0755
rm
test_abc.py
2014
0644
edit
dl
rm
test_api.py
18906
0644
edit
dl
rm
test_arrayprint.py
10215
0644
edit
dl
rm
test_datetime.py
92527
0644
edit
dl
rm
test_defchararray.py
25764
0644
edit
dl
rm
test_deprecations.py
18802
0644
edit
dl
rm
test_dtype.py
26202
0644
edit
dl
rm
test_einsum.py
39598
0644
edit
dl
rm
test_errstate.py
1588
0644
edit
dl
rm
test_extint128.py
5774
0644
edit
dl
rm
test_function_base.py
11429
0644
edit
dl
rm
test_getlimits.py
4613
0644
edit
dl
rm
test_half.py
18648
0644
edit
dl
rm
test_indexerrors.py
4938
0644
edit
dl
rm
test_indexing.py
47966
0644
edit
dl
rm
test_item_selection.py
3665
0644
edit
dl
rm
test_longdouble.py
5967
0644
edit
dl
rm
test_machar.py
1014
0644
edit
dl
rm
test_memmap.py
7075
0644
edit
dl
rm
test_mem_overlap.py
29564
0644
edit
dl
rm
test_multiarray.py
260805
0644
edit
dl
rm
test_nditer.py
108283
0644
edit
dl
rm
test_numeric.py
100854
0644
edit
dl
rm
test_numerictypes.py
14610
0644
edit
dl
rm
test_print.py
8089
0644
edit
dl
rm
test_records.py
15635
0644
edit
dl
rm
test_regression.py
81211
0644
edit
dl
rm
test_scalarinherit.py
771
0644
edit
dl
rm
test_scalarmath.py
25033
0644
edit
dl
rm
test_scalarprint.py
917
0644
edit
dl
rm
test_shape_base.py
18544
0644
edit
dl
rm
test_ufunc.py
54985
0644
edit
dl
rm
test_umath.py
98785
0644
edit
dl
rm
test_umath_complex.py
19800
0644
edit
dl
rm
test_unicode.py
14238
0644
edit
dl
rm
Edit:
/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/tests/test_scalarprint.py
(917B)
# -*- coding: utf-8 -*- """ Test printing of scalar types. """ from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import TestCase, assert_, run_module_suite class TestRealScalars(TestCase): def test_str(self): svals = [0.0, -0.0, 1, -1, np.inf, -np.inf, np.nan] styps = [np.float16, np.float32, np.float64, np.longdouble] actual = [str(f(c)) for c in svals for f in styps] wanted = [ '0.0', '0.0', '0.0', '0.0', '-0.0', '-0.0', '-0.0', '-0.0', '1.0', '1.0', '1.0', '1.0', '-1.0', '-1.0', '-1.0', '-1.0', 'inf', 'inf', 'inf', 'inf', '-inf', '-inf', '-inf', '-inf', 'nan', 'nan', 'nan', 'nan'] for res, val in zip(actual, wanted): assert_(res == val) if __name__ == "__main__": run_module_suite()
Save
cmd:
run