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

Method __trunc__

numpy/core/tests/test_multiarray.py:8787–8788  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected