Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytest-dev/pytest
/ DeviceScalar
Class
DeviceScalar
testing/python/approx.py:722–727 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
720
return
self.value * np.ones(self.size)
721
722
class
DeviceScalar:
723
def
__init__(self, value):
724
self.value = value
725
726
def
__array__(self):
727
return
np.array(self.value)
728
729
expected = 1
730
actual = 1 + 1e-6
Callers
1
test_numpy_array_protocol
Method · 0.85
Calls
no outgoing calls
Tested by
1
test_numpy_array_protocol
Method · 0.68