|
libnpy 2.0.0
Lightweight C++ library for reading and writing NPY and NPZ files
|
libnpy is a multi-platform C++ library for reading and writing NPY and NPZ files, with an additional .NET interface. It was built with the intention of making it easier for multi-language projects to use NPZ and NPY files for data storage, given their simplicity and support across most Python deep learning frameworks.
The implementations in this library are based upon the following file format documents:
Start by installing CMake in the way appropriate for your environment.
Create a build directory and initialize the cmake project:
mkdir build cd build cmake .. --preset release
You can then build and run the tests using:
make ctest
Create a build directory and initialize the cmake project:
mkdir build cd build cmake .. --preset release
You can then build and run the tests using:
cmake --build . --config Release ctest -C Release
Once the library has been built and installed, you can begin to use it in your code. We have provided some example programs (and naturally the tests as well) which show how to use the library, but the basic concepts are as follows. For the purpose of this sample code we will use the built-in tensor class, but you should use your own tensor class as appropriate (see the custom tensor example for details.)
The generated documentation contains more details on all of the functionality. We hope you find that the library fulfills your needs and is easy to use, but if you have any difficulties please create issues so the maintainers can make the library even better. Thanks!