Comments (4)
I'm watching for this feature as well. I have been using an untyped (*const u8
) interface and would be interested in that kind of low level interface as well, or enough low level access that it can be implemented using the right variable ids with the netcdf-sys interface.
from netcdf.
Hi,
I've implemented an alternative to values_at
and values
that can be used with a pre-allocated vector, see the related PR.
As for the equivalent of array_at
, I don't know how to mutate the raw data of an ArrayD.
@bluss The netcdf-sys interface expose all the "nc_get_vara_*" fonction familly from the original C library, Is this what you need ?
from netcdf.
Sure, I'm thinking of nc_get_vara
which uses a void *
. I have a prototype (using netcdf-sys) that is using it:
/// Read variable data of any type; without conversion
///
/// # Safety
///
/// The caller must ensure that `ptr` points to a place where the output can
/// be written safely.
pub unsafe fn read_at(&self, indices: &[size_type], counts: &[size_type], ptr: *mut u8) -> Result<(), Ety>
{
netcdf_lock!();
check(ns::nc_get_vara(self.group_id, self.id, indices.as_ptr(), counts.as_ptr(), ptr as _))
}
I have been struggling to find the right way to work with a "foreign typesystem" (netCDF types in this case) and sometimes using enums everywhere seems both redundant and restrictive. The C approach to "generic" is sometimes really effective. That said, I haven't exactly settled on either way to solve it.
from netcdf.
closed by #21
from netcdf.
Related Issues (20)
- Enable shuffle filter HOT 5
- Change selectors for put/get
- How to read variables with string values? HOT 3
- Typing error when compiling on ARM64 Docker container HOT 4
- Unable to link with `netcdf` library on macOS HOT 2
- Wrong values fetched HOT 6
- codecov and coveralls coverage broken HOT 1
- not being linked properly on windows for end binary HOT 1
- Hash of file changes after opening with rust-netcdf HOT 3
- All paths should accept and return OsString HOT 2
- Investigate and fix docs.rs build HOT 1
- ncdap_test not existing in latest netcdf-src HOT 1
- CI failed HOT 1
- Troubles reading xarray netcdf files HOT 5
- Update to ndarray 0.14.0 HOT 2
- netcdf features should be enabled if available HOT 1
- Update netcdf-src to latest version of netcdf-c
- Add derive macros for more advanced types
- CF Time attribute HOT 13
- thread 'main' panicked at 'Unable to locate HDF5 root directory and/or headers.' HOT 10
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 netcdf.