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

Method __new__

numpy/array_api/_array_object.py:88–91  ·  view source on GitHub ↗
(cls, *args, **kwargs)

Source from the content-addressed store, hash-verified

86
87 # Prevent Array() from working
88 def __new__(cls, *args, **kwargs):
89 raise TypeError(
90 "The array_api Array object should not be instantiated directly. Use an array creation function, such as asarray(), instead."
91 )
92
93 # These functions are not required by the spec, but are implemented for
94 # the sake of usability.

Callers 1

_newMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected