Registry / data / neo
library0.14.4pypypi✓ verified 91d ago

Neo is a Python package for representing electrophysiology data, with support for reading a wide range of neurophysiology file formats. Current version 0.14.4, requires Python >=3.10. Release cadence is irregular.

pip install neo
INSTALL
IMPORT
SIG · NEO
N
neo
datapythonv0.14.4
Install
5.1s avg
Import
861ms
Disk
98MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.14.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.904s · 97.3MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 5.1s · import 0.818s · 94MB
98MB installed
● package 98MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Block
✓ from neo.core import Block
✗ from neo import Block
Block is now in neo.core, not top-level since 0.10.0.
Segment
✓ from neo.core import Segment
✗ from neo import Segment
Segment moved to neo.core.
AnalogSignal
✓ from neo.core import AnalogSignal
✗ from neo import AnalogSignal
AnalogSignal moved to neo.core.
SpikeTrain
✓ from neo.core import SpikeTrain
✗ from neo import SpikeTrain
SpikeTrain moved to neo.core.

Quickstart: creating a basic hierarchical data structure with Block, Segment, AnalogSignal, and SpikeTrain.

import neo from neo.core import Block, Segment, AnalogSignal, SpikeTrain import quantities as pq import numpy as np # Create a Block with a Segment block = Block(name='example') seg = Segment(name='segment1') block.segments.append(seg) # Create an AnalogSignal (1 second of data, 100 Hz) signal = AnalogSignal(np.random.rand(100), sampling_rate=100*pq.Hz, units='mV', name='test') seg.analogsignals.append(signal) # Create a SpikeTrain st = SpikeTrain([0.1, 0.2, 0.3, 0.5]*pq.s, t_stop=1.0*pq.s, units='s', name='test_spikes') seg.spiketrains.append(st) print('Block:', block) print('Signals:', seg.analogsignals) print('Spike trains:', seg.spiketrains)
Debug
Known issues
breakingIn version 0.10.0, core classes were moved from neo.core to neo.core, but the top-level imports (e.g., from neo import Block) were removed. Use from neo.core import ...
fix
Change 'from neo import Block' to 'from neo.core import Block'.
affects: >=0.10.0
breakingUnits handling changed: quantities become mandatory for signal and spike train objects. Passing plain numbers without units may raise errors or produce unexpected behavior.
fix
Always use quantities (e.g., 1.0*pq.s) for time and amplitude values.
affects: >=0.12.0
deprecatedThe 'file_io' subpackage is deprecated in favor of 'io'. Importing from neo.file_io will emit a deprecation warning.
fix
Use 'from neo.io import ...' instead of 'from neo.file_io import ...'.
affects: >=0.14.0
gotchaData arrays for AnalogSignal must be 2D (time x channel) even for single-channel data. If you pass a 1D array, it may automatically reshape but check shape.
fix
Ensure signal data is 2D, e.g., np.random.rand(100, 1).
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'Block' from 'neo'
Block and other core classes moved from neo top-level to neo.core in version 0.10.0.
fix
Use 'from neo.core import Block'.
ValueError: Must supply units for AnalogSignal
AnalogSignal requires units parameter as a quantities object.
fix
Add units='mV' or similar using quantities (import quantities as pq).
TypeError: unsupported operand type(s) for /: 'Quantity' and 'Quantity'
Mixing incompatible units in operations.
fix
Convert units to a common base before arithmetic, e.g., signal.rescale('mV').
Upgrade
Version history
0.14.4latest on PyPI · released Mar 12, 2026
Audit
Dependencies
numpyrequiredNumerical arrays and mathematical operations
quantitiesrequiredPhysical quantities with units
Agent activity
11 hits · last 30 days
node
10
Anthropic
1
Resources
neo — pip install neo · libregistry