npyjs icon indicating copy to clipboard operation
npyjs copied to clipboard

Adds format functionality

Open 1wheel opened this issue 4 years ago • 0 comments

Hey @j6k4m8, this package has been super useful. I sat down to add the ability save files #15 and ended up tweaking a bunch of things:

  • Adds a format function
  • Only expose the parse and format functions. This avoids the need for load error handling #9; there's also not any need for the class wrapper.
  • Converts to a module so the same code can run in node or the browser without bundling.
  • parse throws errors if it encounters unsupported npy options
  • parse reads both bytes of header length and can handle files with larger headers
  • 2 spaces instead of 4 : p

That's a bunch of breaking changes—feel free to only grab the things you want!

1wheel avatar May 20 '21 04:05 1wheel