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

Method __new__

numpy/core/tests/test_function_base.py:12–13  ·  view source on GitHub ↗
(cls, value)

Source from the content-addressed store, hash-verified

10
11class PhysicalQuantity(float):
12 def __new__(cls, value):
13 return float.__new__(cls, value)
14
15 def __add__(self, x):
16 assert_(isinstance(x, PhysicalQuantity))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected