We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
julia> struct Z <: AbstractArray{Int,0}; end Base.size(::Z) = () Base.getindex(::Z) = 0 julia> Z() 0-dimensional Z: 0 julia> reshape(Z(), 1) ERROR: ArgumentError: Cannot call front on an empty tuple Stacktrace: [1] _front at ./tuple.jl:101 [inlined] [2] front at ./tuple.jl:99 [inlined] [3] __reshape at ./reshapedarray.jl:165 [inlined] [4] _reshape at ./reshapedarray.jl:152 [inlined] [5] reshape at ./reshapedarray.jl:92 [inlined] [6] reshape(::Z, ::Int64) at ./reshapedarray.jl:95 [7] top-level scope
The text was updated successfully, but these errors were encountered:
Support reshaping custom 0-dimensional arrays
c0f2bf2
Fixes #26163.
Support reshaping custom 0-dimensional arrays (#26870)
43fe63c
No branches or pull requests
The text was updated successfully, but these errors were encountered: