Skip to content

Numpy support #1431

Closed
Closed
@darikoneil

Description

@darikoneil

Your setup:

  1. Operating System (Linux, MacOS, Windows): Windows 10
  2. Hardware type (x86, ARM..) and RAM: x86, 128 GB RAM, 24 GB VRAM
  3. Python Version (e.g. 3.9): 3.10.8
  4. Caiman version (e.g. 1.9.12): 1.11.3
  5. Which demo exhibits the problem (if applicable): N/A, but insert paths to numpy array or pass array directly
  6. How you installed Caiman (pure conda, conda + compile, colab, ..): conda
  7. Details:

Documentation implies support for numpy arrays (and numpy memmaps, considering they are essentially drop-in), but this is not the case (or at least it's not clear to me how)? If I don't just have reading comprehension issues, an inability to pass data directly is a pretty significant deterrent to use of the package as-is, particularly for real-time / online usage where your data is likely to be flat binary.

Aside from the performance benefits of avoiding multiple memory-swaps, accepting numpy data provides users a lot of flexibility in how to provide their data. From an end-user perspective, it seems a bit silly/convoluted to take some data, convert it to .tif or .hdf5., only to load and then convert it again. Plus, converting to .tif might give someone dozens of files to keep track of and .hdf5 is notorious for corruption (or at least, was). Obviously I can and have edited the functions to accept numpy arrays locally, but perhaps other users might not be savy or motivated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions