ufuncs.py 462 B

1234567891011121314151617
  1. import numpy as np
  2. np.sin(1)
  3. np.sin([1, 2, 3])
  4. np.sin(1, out=np.empty(1))
  5. np.matmul(np.ones((2, 2, 2)), np.ones((2, 2, 2)), axes=[(0, 1), (0, 1), (0, 1)])
  6. np.sin(1, signature="D->D")
  7. np.sin(1, extobj=[16, 1, lambda: None])
  8. # NOTE: `np.generic` subclasses are not guaranteed to support addition;
  9. # re-enable this we can infer the exact return type of `np.sin(...)`.
  10. #
  11. # np.sin(1) + np.sin(1)
  12. np.sin.types[0]
  13. np.sin.__name__
  14. np.sin.__doc__
  15. np.abs(np.array([1]))