How abstracted is the interface? Will there be an API that let's me plug in another language, for instance? I would be incredibly surprised if that is already the case, but I thought it would not hurt to ask ;)
I have considered doing a similar project for javascript, but I had assumed it would require an entire new codebase for each programming language given how different every language is under the hood.
There's always been that extra little step of going from working code to pretty graphs/animations that acts as a barrier to entry to where I almost never do that part. It's not that it's hard, it's just always a PITA with a bunch of required boilerplate and always requires that I dig through the API.
This streamlines that process in a way I didn't think would be possible.
That said.... maybe I'm doing something really dumb, but it's basically unusable for me right now on windows since every time I type the letter "d" it just highlights the line in the interpreter instead of typing the letter. I see this issue has been mentioned already in github though.
I'd love to keep playing around with this some more. I'm also SUUUUUPER curious about doing some GIS integrations using the qgis python libraries.
EDIT: problem should be fixed now. I have just uploaded a new windows build to the website and pushed the changes to master on GitHub. Tested it on my windows machine and it looks like the fix is working properly. Re-downloading the installer file and installing again should resolve the issue.
Can you speak to why a scatter plot and a line plot are distinguished using `(xs, ys, zs)` and `[xs, ys, zs]`?
Using tuple/list for points/lines makes it easy to plot points and lines at the same time, with a single function call, without any nasty keyword arguments.
For example
>>> plot((0,0), (1,1), [(0,0),(1,1)])
The other reason was it makes the code a lot nicer in some places. I tried using a keyword argument at first and there was a lot of additional logic to keep track of.
If you follow the instructions in the install.sh[1] script (which is for doing VM testing with Vagrant), it should hopefully be simple to install from the source code on your system.
https://github.com/MathInspector/MathInspector/blob/master/i...
It is interesting to me that in many respects it serves as “guts”. I definitely drop down to use numpy directly with regularity. But it’s also possible to do 80-90% of the job without ever explicitly using the module itself. It’s baked in everywhere, to the point that it feels like just another standard library.
Exciting to see progress! Keep up the good work, numpy team :)
> it serves not only as a critical bare-metal layer
What's bare-metal about NumPy??
I meant that it can serve the role of low-level, nitty gritty machinery, entirely separate from its use case as a module unto its own right.
Eg, pandas (in some sense) is just a convenience layer on top of numpy—but to me that’s like saying any piece of software is “just a convenience layer on top of python.” It’s partly a means to an end! Not just an end unto itself.
Numpy enables a whole new class of functionality, independent of its direct use as part of my software. Is there a better word for that?
Get this guy a dictionary!
some-file.py:83: DeprecationWarning: `np.bool` is a
deprecated alias for the builtin `bool`. To silence
this warning, use `bool` by itself. Doing this will
not modify any behavior and is safe. If you specifically
wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance:
https://numpy.org/devdocs/release/1.20.0/notes.html#deprecations
return self.z[j][i]
But all of the lines mentioned in these warning do not reference np.boolDid you ever know an interactive environment for producing Fortran code? Anything like a REPL?
However, I do have one request for it. Getting the argmax of a multi-dimensional array, in terms of the array's dimensions, is difficult for new users.
np.argmax(np.array([[1,2,3],[1,9,3],[1,2,3]])) is 4, rather than (1,1). I understand why, but it seems strange to me that argmax cannot return a value the user can use to index their array.
Having to then feed that `4` into unravel_index() with the array's shape as a parameter seems less elegant than say passing a parameter of "as_index=True" to the argmax.
In [1]: np.argmax(np.array([[1,2,3],[1,9,3],[1,2,3]]).flat)
Out[2]: 4a = np.array([[1,2,3],[1,9,3],[1,2,3]])
idx = np.argmax(a)
a.flat[idx] # 9
You can use optional type-hinting in Python now, and install MyPy as a type-checker.
> Annotations for NumPy functions. This work is ongoing and improvements can be expected pending feedback from users.
> Wider use of SIMD to increase execution speed of ufuncs. Much work has been done in introducing universal functions that will ease use of modern features across different hardware platforms. This work is ongoing.
>Preliminary work in changing the dtype and casting implementations in order to provide an easier path to extending dtypes. This work is ongoing but enough has been done to allow experimentation and feedback.
> Extensive documentation improvements comprising some 185 PR merges. This work is ongoing and part of the larger project to improve NumPy’s online presence and usefulness to new users.
> Further cleanups related to removing Python 2.7. This improves code readability and removes technical debt.
> Preliminary support for the upcoming Cython 3.0.
Type annotations seem the biggest deal to me. I'd say if you care a lot about SIMD and the performance issues, you should be thinking of moving to Julia: it's still a valuable technical achievement.Numpy is an incredible piece of software and provides performance for one of the most mainstream language. It has been one of the main building block in the python takeover in data science, ml, etc. But if I had the choice, I would have move to Julia during my precedent work/projects as soon as it reached v1.
Basically, across projects, I've been reusing a snippet that uses some as_strided magic for years now. The snippet looks seriously deranged, it will be great to refer to something built in... also for my colleagues who now have to understand my as_strided shits.
With the added advantage that TF is natively accelerated on M1.
Will TF-Numpy maintain parity ?
Because for some reason data scientists have managed to misuse the python syntax. E.g. `np.ogrid[ -200000000:200000000:100j,-500000:500000:100j]` it's completely unexplainable what this does. They have managed to overload index/slice operator and imaginary numbers to produce two arrays.
(Example taken from here https://asecuritysite.com/comms/plot06 )
Shuffles arrays and lists. https://numpy.org/doc/stable/reference/random/generated/nump...