ArrayPartition violates the documentation of eltype
Los mantenedores suelen responder en 1 día
@oscardssmith ya está trabajando en esto.
Desde el 25/10/2024.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Describe the bug 🐞
In some situations ArrayPartition violates the documentation of eltype:
eltype(type)
Determine the type of the elements generated by iterating a collection...
But this is not always the case (see MWE below).
As I understand the ArrayPartition declares eltype as a type that all udnerlying elements can be promoted to.
This behaviour might be by design, but it has a real practical implication.
Perhaps can be fixed on ForwardDiff side by extra promoting, but this can have other weird edge cases.
At the very least this behaviour can be documented as desired?
Minimal Reproducible Example 👇
julia> v = ArrayPartition([ 0.0 ], [ 1 ])
([0.0], [1])
julia> for e in v
@show e isa eltype(v)
end
e isa eltype(v) = true
e isa eltype(v) = false # would expect `true` here
Environment (please complete the following information):
- Output of
using Pkg; Pkg.status()
(jl_ZYBD4c) pkg> st
Status `/private/var/folders/kf/1t2_wf7n49sgxmzzmmgsb1j40000gn/T/jl_ZYBD4c/Project.toml`
[731186ca] RecursiveArrayTools v3.26.0
- Output of
versioninfo()
julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 10 × Apple M2 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
- Lenguaje dominante
- Julia
- Estrellas
- 234
- Forks
- 77
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SciML/RecursiveArrayTools.jl
-
Docs: usage of j vs iAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
SciML/RecursiveArrayTools.jl#255 ·
Los mantenedores suelen responder en 1 día
-
JET: similar_type(::Any) no-matching-method in RecursiveArrayToolsRaggedArrays (pre-existing QA red)Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
SciML/RecursiveArrayTools.jl#620 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
SciML/RecursiveArrayTools.jl#619 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
SciML/RecursiveArrayTools.jl#570 ·
Los mantenedores suelen responder en 1 día
-
Re-enable downgrade CI testsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
SciML/RecursiveArrayTools.jl#522 ·
Los mantenedores suelen responder en 1 día
Todos los issues de SciML/RecursiveArrayTools.jl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
SciML/ModelingToolkit.jl#5255 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
QuantEcon/QuantEcon.jl#412 ·
-
docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
SciML/ModelingToolkitStandardLibrary.jl#521 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CliMA/Oceananigans.jl#6144 ·
Los mantenedores suelen responder en 1 día