Comments (1)
Hey! Glad to hear it is useful! 😊 (Still — I haven't revisited this package anywhere near as much as I'd like to.)
Anyway, it seems you've hit a numba issue. Numba has support for many NumPy functions inside JITted functions, but if you look closely at this part of the error:
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<function nanstd at 0x000001BA5B414F70>) found for signature:
>>> nanstd(array(float64, 1d, C), ddof=Literal[int](1))
There are 2 candidate implementations:
- Of which 2 did not match due to:
Overload in function 'np_nanstd': File: numba\np\arraymath.py: Line 1231.
With argument(s): '(array(float64, 1d, C), ddof=int64)':
Rejected as the implementation raised a specific error:
TypingError: got an unexpected keyword argument 'ddof'
raised from C:\Users\jbrown\AppData\Local\Programs\Python\Python38\lib\site-packages\numba\core\typing\templates.py:791
it's not expecting the ddof argument, and if you look at their NumPy support page:
https://numba.readthedocs.io/en/stable/reference/numpysupported.html#reductions
indeed it says that only the first argument of nanstd is supported.
You could raise an issue with numba, or you can code up your own nanstd (or nnzstd since you're apparently just looking to get rid of zeros?) and jit-compile it with Numba. Something like:
@numba.njit
def nnzstd(arr):
nz = arr[arr != 0]
n = len(nz)
if n <= 1:
return np.nan
mu = np.mean(nz)
var = np.sum((nz - mu) ** 2) / n - 1
std = np.sqrt(var)
return std
Since this is not an llc issue I'm going to close it, but please feel free to continue discussing this issue here if you have more questions!
from llc-tools.
Related Issues (9)
- Sample code on your blog not working HOT 2
- ValueError: Invalid scipy.LowLevelCallable signature on Windows HOT 11
- Create documentation on ReadTheDocs
- Add function for scipy.integrate.quad
- Add docstrings to all the functions
- Improve our testing
- Add continuous integration using github actions
- Pass arguments to the LowLevelCallable HOT 2
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 llc-tools.