Skip to content

WIP: Support for Numpy .npy files#109

Open
jonnor wants to merge 2 commits into
masterfrom
emlearn-npy
Open

WIP: Support for Numpy .npy files#109
jonnor wants to merge 2 commits into
masterfrom
emlearn-npy

Conversation

@jonnor

@jonnor jonnor commented Mar 28, 2025

Copy link
Copy Markdown
Collaborator

.npy files are very useful for exchanging numeric arrays between Python and C.

The main motivating cases for including this in emlearn are:

  • Checking/testing of the on-device pipeline and models, using a validation dataset (exported from Python on host)
  • Passing data when validating converted models on the host. Will eventually replace eml_test_read_csv used in emlearn.common.CompiledClassifier
  • Support feature extraction to enable C feature extraction to be used transparently from Python (future)

This implementation aims to support constrained microcontrollers. This means:

  • Support streaming processing of data in chunks.
  • No dynamic allocation.
  • Small in terms of code size
  • Work with any file/stream I/O abstraction

Conceptually it is similar to https://github.com/jonnor/micropython-npyfile (for MicroPython)

@jonnor jonnor added the enhancement New feature or request label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant