Comments (3)
Yes, this is not specific to NamedTuples. Currently it's giving 2 since a UnionAll type has 2 components. I'm not sure what to do in this case, but it should be addressed in base julia.
from namedtuples.jl.
julia> using NamedTuples
julia> x = @NT(a = 0.0, b = 0.0, c = 0.0)
(a = 0.0, b = 0.0, c = 0.0)
julia> nfields(NamedTuples._NT_a_b_c)
2
# however:
julia> nfields(typeof(x))
3
Not sure if this is a bug. cc @JeffBezanson
from namedtuples.jl.
See discussion in JuliaLang/julia#22350
from namedtuples.jl.
Related Issues (20)
- segfault when pre-compiling a modules that use NamedTuples HOT 10
- Data conversion from a tuple to a named tuple.
- setindex doesn't seem to work as advertised HOT 1
- Merge seems not to work for empty tuples
- How to loop over key/value pairs? HOT 3
- Roadmap for this NamedTuples package after NamedTuples being merged in Julia master branch HOT 3
- merge a collection of named tuples HOT 1
- Compatibility with Julia 0.7
- Create a NamedTuple from a tuple of symbols and a tuple of values HOT 3
- Stackoverflow using named tuples in broadcasting
- Maintainers HOT 2
- Can't construct tuple with "implicit" fieldname unless all are. HOT 3
- compatibility with Julia 1.0 HOT 3
- Precompile error with julia 1.0 on windows. HOT 1
- LoadError: UndefVarError when loading NamedTuples HOT 3
- Tests fail on Windows 10 HOT 3
- Compile error in Julia v1.0 HOT 1
- Restricted to version 4.0.2 HOT 1
- Package compatibility caps
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 namedtuples.jl.