We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a request to implement the BMI get_value_ptr method in the C++ cookiecutter template.
The text was updated successfully, but these errors were encountered:
Here's a possible way to do it:
cpdef get_value_ptr(self, name): cdef int gid = self.get_var_grid(name) cdef int size = self.get_grid_size(gid) cdef void* ptr ptr = self._bmi.GetValuePtr(<char*>name) return np.asarray(<np.float_t[:size]>ptr)
This is C-like, though; I'm not sure if there's a cleaner C++ way to do this.
Sorry, something went wrong.
No branches or pull requests
This is a request to implement the BMI get_value_ptr method in the C++ cookiecutter template.
The text was updated successfully, but these errors were encountered: