Comments (4)
I guess this is because def_property_readonly
expects a const reference, and not a return by value? So maybe user error...?
from nanobind.
This looks like a bug to me, you aren't doing anything unsupported.
Could you give this a try with the latest version of nanobind (git, master branch)? The enum support had a number of changes in the last few days. The testcase you posted passes on my computer.
from nanobind.
(nevermind, I see now that there is some kind of issue)
from nanobind.
Fixed in master.
from nanobind.
Related Issues (20)
- [BUG]: kwargs dispatch fails when receiving a non-interned version of a keyword HOT 3
- [BUG]: can't call exposed member of a type not known to nanobind
- unable to pass linker flags HOT 1
- [BUG]: Complex type does not work in variant HOT 6
- [BUG]: Docstring/signature of bound function not rendering properly HOT 12
- [BUG]: The stride of an ndarray can be wrong for numpy views HOT 5
- [BUG]: weirdness with "big" uint ndarray HOT 3
- [BUG]: The typename defined in nb::sig found partly stripped in the generated stub HOT 5
- [BUG]: nb::arg("name").sig("sig") doesn't work HOT 3
- [BUG]: 'wrapper' type casters can crash by raising exceptions through noexcept HOT 6
- [OTHER]: ndarray <-> Eigen type mismatch error would be easier to interpret if supplied argument types included the provided `shape` HOT 3
- [BUG]: Ubuntu, CMake, .so file is built but no python library. HOT 6
- [BUG]: object won't be released until exit python HOT 5
- [BUG]: inst_dealloc() Function Execution Is Slow HOT 3
- [BUG]: error "nanobind requires a newer PyPy version (>= 7.3.10)" HOT 2
- [BUG]: importing my_ext fails with "ModuleNotFoundError: No module named 'my_ext'" on Windows HOT 3
- [BUG]: Classes Using MatrixXd Attributes and in Initializer List Have Type Errors HOT 1
- [Request]: stl vector.reserve(...) method HOT 1
- nanobind enum design flawed (mutation can break things globally) HOT 6
- [OTHER]: Stub generation + editable install? HOT 2
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 nanobind.