Comments (2)
Hi Ryan,
Thank you!
This is a great point. In retrospect, I probably need to adjust how requirements.txt is created so that it only references the package folder... not the full set of examples and sample runs.
Daniel Rothenberg suggested the use of apply_ufunc
in run_sample.py, so it is adapted there, but is not a stand-alone tool within the padckage.
I don't know exactly what a "compatibility layer" is (this being my first foray into this kind of project, I'm still learning), but it sounds really useful. Is it basically a go-between function that allows the user to directly pass xarray data in and out of the main function, but within the package itself? A tool like this could be very helpful!
from tcpypi.
Is it basically a go-between function that allows the user to directly pass xarray data in and out of the main function, but within the package itself? A tool like this could be very helpful!
Yes exactly. In this module from fastjmd95, we have just a quick bit of code (in the form of a decorator) that checks whether the user is passing a regular numpy array, a dask array, or an xr.DataArray. For the later two, it does a little something extra to "wrap" the call to the underlying numba function (which operates only on raw numpy arrays).
In your case, this logic would need to be a bit more complex, since you treat the vertical axis specially. But the same basic pattern would still apply.
The benefit for the user is that they never have to "leave" xarray.
from tcpypi.
Related Issues (14)
- Issue in writing variables HOT 1
- Error in tcpypi installation HOT 1
- Problem when using pi.py HOT 2
- Python required version is not compatible with versions of packages in setup.py HOT 1
- Setting specific package versions may not be the best idea. HOT 2
- Can we change file for "run_sample.py" from a pickle file to a more portable format? HOT 4
- Rename pyPI to tcpyPI? HOT 3
- tcpypi won't install HOT 1
- Pinned versions of xarray, numba, numpy HOT 3
- data and validation HOT 1
- python run_sample.py ERROR HOT 3
- output variable values are all Zero HOT 1
- how to calculate outflow temperature level
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 tcpypi.