Closed telegraphic closed 1 year ago
This allows a bifrost ndarray to be instantiated from a BFarray struct (as returned by ndarray.as_BFarray())
ndarray.as_BFarray()
Minimal example:
a = bifrost.ndarray(np.arange(100), dtype='i32') aa = a.as_BFarray() b = bifrost.ndarray(aa) np.testing.assert_equal(a, b)
(PS: Apologies, meant to push this to my telegraphic fork and then open PR request)
This allows a bifrost ndarray to be instantiated from a BFarray struct (as returned by
ndarray.as_BFarray()
)Minimal example: