MCPcopy Create free account
hub / github.com/numpy/numpy / test_generic_rank3

Method test_generic_rank3

numpy/testing/tests/test_utils.py:104–121  ·  view source on GitHub ↗

Test rank 3 array for all dtypes.

(self)

Source from the content-addressed store, hash-verified

102 self._assert_func(x, y)
103
104 def test_generic_rank3(self):
105 """Test rank 3 array for all dtypes."""
106 def foo(t):
107 a = np.empty((4, 2, 3), t)
108 a.fill(1)
109 b = a.copy()
110 c = a.copy()
111 c.fill(0)
112 self._test_equal(a, b)
113 self._test_not_equal(c, b)
114
115 # Test numeric types and object
116 for t in '?bhilqpBHILQPfdgFDG':
117 foo(t)
118
119 # Test strings
120 for t in ['S1', 'U1']:
121 foo(t)
122
123 def test_nan_array(self):
124 """Test arrays with nan values in them."""

Callers

nothing calls this directly

Calls 1

fooClass · 0.50

Tested by

no test coverage detected