Skip to content

Load() method lacking for lazy reader? #735

Closed

Description

@luiztauffer

Hi, following instructions from docs I’m trying to lazy read a directory with Neuralynx files, but can’t find a way to load the data to memory. E.g.:

from neo.io.neuralynxio import NeuralynxIO
import os

dirname = os.path.join(os.getcwd(), 'data')
nio = NeuralynxIO(dirname=dirname, use_cache=False)

seg = nio.read_segment(lazy=True)
anasig = seg.analogsignals[0]
anasig.load()

which raises:

AttributeError: 'AnalogSignal' object has no attribute 'load'

I can read slices of data with:

nio.get_analogsignal_chunk(channel_indexes=[0], i_start=0, i_stop=100)

I’m not sure if this is a bug, or am I doing something wrong?

Activity

  1. apdavison commented on Sep 23, 2019

    @apdavison
    Member

    https://neo.readthedocs.io/en/latest/ shows the docs for the development version.

    If you installed Neo with pip install neo you will have the latest release (0.7.2), which does not contain the lazy loading as shown in your example. The docs for the latest released version are at https://neo.readthedocs.io/en/0.7.2 or https://neo.readthedocs.io/en/stable

    We will probably release Neo 0.8.0 within the next week, at that point pip install -U neo will upgrade to the new version, and your code example should then work.

  2. added this to the 0.8.0 milestone on Sep 23, 2019
  3. luiztauffer commented on Sep 23, 2019

    @luiztauffer
    ContributorAuthor

    @apdavison thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions