-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
neo.units module (Issue278) #297
Conversation
(Units need a change to units: not final commit)
And remove Quantities import in the code (except for units module)
(by using units module)
@jgonin Please can you resolve the conflicts by rebasing your changes onto the latest master (see https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request for how to do this, replacing "edx/edx-platform" with "NeuralEnsemble/python-neo") |
(Units need a change to units: not final commit) Partly removed And remove Quantities import in the code (except for units module) Small precision : (by using units module)
# Conflicts: # neo/io/nixio.py # neo/test/iotest/test_nixio.py
# Conflicts: # neo/test/coretest/test_epoch.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main point: do not import the Quantity
class from neo.units
, that should be imported as pq.Quantity
, as before.
Also note that there are some new h5 files in the tests folder, and some additional temporary Python files created by Git that should not be there.
@@ -0,0 +1,206 @@ | |||
# -*- coding: utf-8 -*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This files should not be here - there are other similar files generated (I think) by Git merging or rebase operations, which have been added to the commit and need to be removed.
@@ -66,7 +66,7 @@ cut across the simple container hierarchy. | |||
NumPy compatibility | |||
=================== | |||
|
|||
Neo data objects inherit from :py:class:`Quantity`, which in turn inherits from NumPy | |||
Neo data objects inherit from :py:class:`Quantity` (by using units module), which in turn inherits from NumPy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert - we should not import Quantity via the units
module
@@ -173,7 +174,7 @@ def generate_diagram(filename, rect_pos, rect_width, figsize): | |||
else: | |||
t1 = attrname | |||
|
|||
if attrtype == pq.Quantity: | |||
if attrtype == un.Quantity: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the units
module only for importing units, not for the quantities.Quantity
class. This should still be pq.Quantity
@@ -64,7 +65,7 @@ def _new_AnalogSignalArray(cls, signal, units=None, dtype=None, copy=True, | |||
**annotations) | |||
|
|||
|
|||
class AnalogSignal(BaseNeo, pq.Quantity): | |||
class AnalogSignal(BaseNeo, un.Quantity): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should stay as pq.Quantity
@joffreygonin: rawio is now the master. |
Create
neo.units
module #278