Comments (6)
So yes, I cannot make so much sense of these outputs and I cannot say if some of them are expected and/or are known to not be working like for int***
.
Would be great if you can have a look when you have some time!
from cppyy.
The assignments and passing should work fine per se (I have a whole set of tests that do just that, up to 3D, see here: https://github.com/wlav/cppyy/blob/master/test/test_lowlevel.py#L506). The problem appears wholly with bar = ll.malloc[dtype](4)
, as for the first twobar
thinks it's an integer array and for the last one a long array (hence the type mismatch; the long most obviously b/c it represents the pointer).
Must be something obvious missing as the generated malloc funcs aren't any different than the ones I use in the test ...
from cppyy.
The problem is the reshaping. For the result to know that it is of length 4
, the ll.malloc
call fixes up the size after the fact, by reshaping to (4,)
. And that turns each multi-dim array into a 1D array. That's an easy fix, at least for the int**
case, which seems to have the proper shape before the reshaping (is in repo; change is in ll.py, so easy to apply locally). The int***
case, however, does not. Still digging for that one.
from cppyy.
Okay, done. I had to refactor the executors same way as the converters to support any-dimensional pointer returns.
from cppyy.
Wow that was super efficient! Thanks a lot!
So yes, in my case I wasn't using ll.malloc, but I was doing the same mistake with the reshaping.
from cppyy.
Released with cppyy 2.2.0 and its dependencies.
from cppyy.
Related Issues (20)
- Not working on Windows HOT 10
- Special variables are missing with pypy
- Segfault during garbage collection HOT 1
- Segfault when class owns a unique_ptr HOT 1
- Enums are not correctly resolved when using an alias within a class/struct HOT 2
- Read/write past end of object of an enum type declared via a type alias if size is less than 4 bytes HOT 4
- Manually specifying the `-march` compiler flag HOT 2
- Conversion operator seems not to be working HOT 1
- How about this code? HOT 1
- Change of behavior of heuristic memory policy
- Setting any member from Python for a C++ class HOT 1
- cppyy/test: make all build command fails HOT 6
- Implicit conversion to `unique_ptr` hijacks overload resolution. HOT 3
- Deprecation warning when importing `cppyy` in unit tests
- Leaks with cppyy==3.1.2 HOT 4
- Importing cppyy before xgboost breaks xgboost HOT 1
- Statefulness of converters is not considered over multiple function calls HOT 2
- `TypeError` instead of common exception type for overloaded functions HOT 1
- Macro redefined '__CLING__GNUC__' warning while running sample CUDA code HOT 2
- Should assert() work? HOT 4
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 cppyy.