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

Class HasTrunc

numpy/core/tests/test_multiarray.py:8786–8788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8784 # Python 3.11.
8785 if sys.version_info < (3, 11):
8786 class HasTrunc:
8787 def __trunc__(self):
8788 return 3
8789 assert_equal(3, int_func(np.array(HasTrunc())))
8790 with assert_warns(DeprecationWarning):
8791 assert_equal(3, int_func(np.array([HasTrunc()])))

Callers 1

test_to_int_scalarMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_to_int_scalarMethod · 0.68