I’m starting to work with DGL’s C++ code base, and one thing I’m very unclear about is how to work with the NDArray
class, which is used all over the place.
For instance: how do I read and write elements in an NDArray
? eg if I have an NDArray
with shape=[2, 3], I’d like to:
(1) Read the entry at ndarray[0, 1]
(2) Write ndarray[0, 1] = 42.0f
Any tips on the above? Thanks!