I have a Numpy ndarray of three large arrays and I'd just like to store the path to the file that generated the data in there somewhere. Some toy data:
A = array([[ 6.52479351e-01, 6.54686928e-01, 6.56884432e-01, ...,
2.55901861e+00, 2.56199503e+00, 2.56498647e+00],
[ nan, nan, 9.37914686e-17, ...,
1.01366425e-16, 3.20371075e-16, -6.33655223e-17],
[ nan, nan, 8.52057308e-17, ...,
4.26943463e-16, 1.51422386e-16, 1.55097437e-16]],
dtype=float32)
I can't just append it as an array to the ndarray because it needs to be the same length as the other three.
I could just append np.zeros(len(A[0]))
and make the first value the string so that I can retrieve it with A[-1][0] but that seems ridiculous.
Is there some metadata key I can use to store a string like /Documents/Data/foobar.txt'
so I can retrieve it with something like A.metadata.comment
?
Thanks!