MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / numpy

Method numpy

tools/Polygraphy/polygraphy/comparator/struct.py:51–62  ·  view source on GitHub ↗

Get the NumPy array, deserializing from the disk if it was stored earlier. Returns: np.ndarray: The NumPy array

(self)

Source from the content-addressed store, hash-verified

49 self.arr = arr
50
51 def numpy(self):
52 """
53 Get the NumPy array, deserializing from the disk if it was stored earlier.
54
55 Returns:
56 np.ndarray: The NumPy array
57 """
58 if self.arr is not None:
59 return self.arr
60
61 assert self.tmpfile is not None, "Path and NumPy array cannot both be None!"
62 return load_json(self.tmpfile.name)
63
64
65@Encoder.register(LazyNumpyArray)

Callers 6

test_unswapped_arrayMethod · 0.95
test_swapped_arrayMethod · 0.95
encodeFunction · 0.45
valuesMethod · 0.45
itemsMethod · 0.45
__getitem__Method · 0.45

Calls 1

load_jsonFunction · 0.90

Tested by 2

test_unswapped_arrayMethod · 0.76
test_swapped_arrayMethod · 0.76