Comments (3)
julia> methods(ntuple, Tuple{Any,Val})
# 5 methods for generic function "ntuple" from Base:
[1] ntuple(f, ::Val{3})
@ ntuple.jl:50
[2] ntuple(f, ::Val{2})
@ ntuple.jl:49
[3] ntuple(f, ::Val{1})
@ ntuple.jl:48
[4] ntuple(f, ::Val{0})
@ ntuple.jl:47
[5] ntuple(f::F, ::Val{N}) where {F, N}
@ ntuple.jl:69
Five methods is too much for inference which therefore bails out. Which is quite unfortunate. Maybe it's worth renaming those to _ntuple
and adding ntuple(f::F, ::Val{N}) where {F,N} = _ntuple(f, Val{N}())::Tuple{Vararg{Any,N}}
?
from julia.
#54528 is an alternative to that
from julia.
👍 Yes, that looks like good idea to me.
from julia.
Related Issues (20)
- sleep_state not_sleeping is not reset as required by signals
- [Test] need shim for FieldError
- Julia builds for `native` CPU, even with `XC_HOST = x86_64-w64-mingw32` HOT 2
- Performance regressions in linear algebra benchmarks with Hermitian and Triangular matrices
- Performance regressions in BaseBenchmarks due to #54647 (Cleanup `MemoryRef`) HOT 2
- observed failure of TestPkg thread test
- race condition in waitany test
- Regression in threads tests on FreeBSD
- Operations on `views` much slower when indices are `start:1:stop` HOT 7
- [1.11+] jl_array_t no longer contains elsz HOT 1
- Unreachable reached
- `mkpath` does not stably return the original path
- Deserialization in a Module() HOT 2
- `last(::Tuple{})` throws `BoundsError` HOT 5
- document `FieldError`
- peek docstring has a disconnect HOT 2
- Precompiling and FunctionWrappers lead to extra runtime allocations HOT 4
- Matrix `exp` and `log` are not inverse of each other HOT 10
- recursive type parameter constraints HOT 1
- [CI] Intermittent failure in `Profile` on aarch64-linux-gnu
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 julia.