0

I have npy file which seems it is a numpy.ndarray, (array of object), I want to reach the values for a specific item. How can I do it? This picture shows a part of npy file content and for example I have to reach values for avgmotion:

data sample

2

1 Answer 1

1

it seems that the variable you're using is a dictionary.

You have to access to the values of the key : avgmotion by simply putting the information in variable, let's assume your dictionary's variable is name_of_dict.

   avgmotion = name_of_dict["avgmotion"]

After that you can check the shape and size of your array and try to extract whatever data you want.

Sign up to request clarification or add additional context in comments.

1 Comment

this method showes me this error=> IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.