Comments (1)
I don't understand the "subclasses of ndarray" comment
The commit message gives slightly more explanation
commit 9c7e6e30315ab4541775d9a78630e88423c752c1
Author: Charles Harris <[email protected]>
Date: Fri Oct 4 13:49:33 2013 -0600
BUG: Refactor nanfunctions to behave as agreed on for 1.9.
Deal with subclasses of ndarray, like pandas.Series and matrix.
Subclasses may not define the new keyword keepdims or deal
gracefully with ufuncs in all their forms. This is solved by
throwing the problem onto the np.sum, np.any, etc. functions
that have ugly hacks to deal with the problem.
Settle handling of all-nan slices.
nanmax, nanmin -- Raise warning, return NaN for slice.
nanargmax, nanargmin -- Raise ValueError.
nansum -- Return 0 for slice.
nanmean, nanvar, nanstd -- Raise warning, return NaN for slice.
Make NaN functions work for scalar arguments.
This may seem silly, but it removes a check for special cases.
Update tests
Deal with new all-nan handling.
Test with matrix class as example of subclass without keepdims.
Test with scalar arguments.
Fix nanvar issue reported in #3860.
Closes #3860 #3850
Indeed, I see that pandas.Series chokes with keepdims=True. But we're not doing that so I think we should be fine with np.fmin.reduce(self.p_signal, axis=0)
.
If we care about object arrays, we could use np.nanargmin
and np.nanargmax
instead (but those are less efficient for numeric arrays.)
from wfdb-python.
Related Issues (20)
- Accessing a file in a subfolder on PhysioNet using pn_dir HOT 2
- Advanced Scientific Data Format
- Unable to write WFDB with subtyp = -1 HOT 1
- Correct sampto behaviour using rdsamp and rdann? HOT 2
- HTML documentation does not distinguish between parameters and return values
- wfd.processing.qrs.xqrs_detect() does not pass the learn parameter to xqrs.detect()
- Third loop in wfdb.processing.peaks.find_local_peaks will not be executed and can be removed
- I try to use Rdsamp but it says the file cannot be found. I am using Jupyter notebook HOT 4
- AttributeError: module 'wfdb.io' has no attribute 'convert'
- ann2rr returns ghost beats
- Record.adc: RuntimeWarning: invalid value encountered in cast HOT 2
- FLAC Writing is not supported. HOT 2
- rdsamp and wrsamp not isopmorphic HOT 4
- Broken with libFLAC < 1.4.0 ("internal psf_fseek() failed") HOT 4
- annotation.py:get_contained_labels (1335): pandas throws TypeError: Passing a set as an indexer is not supported. Use a list instead.
- Broken with libFLAC 1.4.0 through 1.4.2 ("internal psf_fseek() failed") HOT 11
- csv_to_wfdb writes to current dir; needs param to specify output folder HOT 3
- OverflowError: Python integer 256 out of bounds for uint8 HOT 5
- Continuous integration tests fail intermittently with no clear cause
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wfdb-python.