Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Make .npy File? #36

Closed
so0c opened this issue Feb 1, 2021 · 1 comment
Closed

How to Make .npy File? #36

so0c opened this issue Feb 1, 2021 · 1 comment

Comments

@so0c
Copy link

so0c commented Feb 1, 2021

@pterhoer @jankolf

Hi, smart guys !

I want to make own .npy files in data folder.
but i cant make this file..

plz help me 馃槬

@so0c so0c closed this as completed Feb 1, 2021
@so0c so0c reopened this Feb 1, 2021
@jankolf
Copy link
Collaborator

jankolf commented Feb 1, 2021

Hi,
you can save numpy-arrays bei calling numpy.save(file-path, array). You can have a look at the documentation of numpy.

A code snippet could look like this:

import numpy
data = numpy.array(...)
numpy.save("./data/my_data.npy", data)

If you have problems saving your data, make sure that you have read/write access to the location you are writing your data to.
Also, make sure that the path you are passing to save function is correct.

You can load data by calling the numpy.load function (Documentation):

data  = numpy.load("./data/my_data.npy")

@pterhoer pterhoer closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants