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

Method compare_array_value

numpy/core/tests/test_numeric.py:2814–2823  ·  view source on GitHub ↗
(self, dz, value, fill_value)

Source from the content-addressed store, hash-verified

2812 self.shapes = [(), (5,), (5,6,), (5,6,7,)]
2813
2814 def compare_array_value(self, dz, value, fill_value):
2815 if value is not None:
2816 if fill_value:
2817 # Conversion is close to what np.full_like uses
2818 # but we may want to convert directly in the future
2819 # which may result in errors (where this does not).
2820 z = np.array(value).astype(dz.dtype)
2821 assert_(np.all(dz == z))
2822 else:
2823 assert_(np.all(dz == value))
2824
2825 def check_like_function(self, like_function, value, fill_value=False):
2826 if fill_value:

Callers 1

check_like_functionMethod · 0.95

Calls 3

assert_Function · 0.90
astypeMethod · 0.80
allMethod · 0.45

Tested by

no test coverage detected