Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Spacegrids is an open source library providing a Numpy array with grids, labelled axes and associated grid-related mathematical methods such as regridding and integration. Spacegrids provides an object data model of Netcdf data that ensures consistency between a Numpy data array and its grid under common operations (and so avoiding common pitfalls related to axis interpretation), and much more. It is a write less do more library for everyday use.
These interactive plots from Netcdf data <https://willospace.pythonanywhere.com/>
_ are based on Spacegrids.
The Field, Gr (grid) and Coord objects make everyday use easy:
>>> import spacegrids as sg
>>> D = sg.info(nonick = True)
>>> P = sgPproject(D['my_project'] , nonick = True)
>>> P.load(['temperature','u'])
>>> # obtain the axes objects under their names T,X,Y,Z:
>>> for c in P['some_experiment'].axes:
>>> exec c.name + ' = c' # now we can refer to X,Y
>>> TEMP = P['some_experiment']['temperature']
>>> U = P['some_experiment']['u'] # zonal velocity
>>> TEMP_sliced = TEMP[Y,:50] # slice. Note Y axis object
>>> m_TEMP = TEMP_sliced/(X*Y) # take hor. mean
>>> TEMP_regridded = TEMP.regrid(U.gr) # U grid differs
There is lots of documentation, both in the source code and elsewhere. Other documentation can be found at:
a practical tutorial <http://nbviewer.ipython.org/github/willo12/spacegrids/blob/master/Spacegrids.ipynb>
_a more advanced tutorial <http://nbviewer.ipython.org/github/willo12/spacegrids/blob/master/advanced.ipynb>
_an overview of all classes, methods and functions <http://web.maths.unsw.edu.au/~wsijp/html/index.html>
_interactive Netcdf data plots <http://willospace.pythonanywhere.com>
_ based on SpacegridsInstall spacegrids simply by running (on command line):
pip install spacegrids
Dependencies: numpy, scipy, matplotlib (NetCDF4 optional). On Ubuntu/ Debian, install dependencies via package manager if pip install fails:
apt-get install python-{tk,numpy,matplotlib,scipy}
On Mac, pip can be installed via "sudo easy_install pip".
If you are having issues, please let us know.
The project is licensed under the BSD license.
FAQs
numpy array with grids and associated operations
We found that spacegrids demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.