Comments (2)
The error says that there is no call_py function specifically for ndarrays as first argument. You can however use an object
and the use cast
to create a ndarray
type(object) :: ypred_obj
!...
ierror = call_py(ypred_obj, loaded_model, "predict", args)
ierror = cast(Ypred, ypred_obj)
from forpy.
Hi, sorry for the late reply.
Maybe this helps: https://github.com/ylikx/forpy/wiki/Working-with-arrays#accessing-array-elements-with-ndarrayget_data
I think the most efficient way would be to keep working with the Fortran pointer which points to the internal representation of the numpy array. Unfortunately one has to then keep working with the transpose on the Fortran side.
Sometimes it might be possible to write the Python part in a way that it produces not the original matrix but the transpose (in C order). Then in Fortran one could work with the original matrix (this time in Fortran order).
from forpy.
Related Issues (20)
- Timing HOT 2
- Error was shown when build command was employed HOT 6
- Transposed arrays HOT 1
- forpy / python-script crashes when python multiprocesing is used HOT 18
- Support for tensorflow and fortran 90? HOT 1
- Support for tensorflow or keras? HOT 1
- Values transferred with np.copy() do not reach Fortran HOT 2
- ifort linking error on linux machine HOT 1
- Time measurements / wallclock time failure HOT 2
- `/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x24): undefined reference to `main'` HOT 3
- `UserWarning: mkl-service package failed to import ` in the import example HOT 3
- Do I need to import_py for numpy?
- problem running example "intro_to_forpy.F90" HOT 2
- 'ld: symbol(s) not found for architecture x86_64' Problem with compiling the intro_to_forpy.F90 example on MacOS HOT 6
- Python function returning a list results in an empty list when converting to Forpy list HOT 2
- The 'sklearn' PyPI package is deprecated, use 'scikit-learn' HOT 1
- How to release the GIL HOT 1
- Issue with forpy_initialize() HOT 1
- Segmentation fault error when calling ndarray_create HOT 1
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 forpy.