MCPcopy
hub / github.com/numpy/numpy / test_multiiter_fields

Function test_multiiter_fields

numpy/_core/tests/test_cython.py:223–235  ·  view source on GitHub ↗
(install_temp, arrays)

Source from the content-addressed store, hash-verified

221 ]
222)
223def test_multiiter_fields(install_temp, arrays):
224 import checks
225 bcast = np.broadcast(*arrays)
226
227 assert bcast.ndim == checks.get_multiiter_number_of_dims(bcast)
228 assert bcast.size == checks.get_multiiter_size(bcast)
229 assert bcast.numiter == checks.get_multiiter_num_of_iterators(bcast)
230 assert bcast.shape == checks.get_multiiter_shape(bcast)
231 assert bcast.index == checks.get_multiiter_current_index(bcast)
232 assert all(
233 x.base is y.base
234 for x, y in zip(bcast.iters, checks.get_multiiter_iters(bcast))
235 )
236
237
238def test_dtype_flags(install_temp):

Callers

nothing calls this directly

Calls 1

allFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…