Skip to content
New issue

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

one(::AbstractMatrix) always returns Array #54161

Closed
nsajko opened this issue Apr 20, 2024 · 0 comments · Fixed by #54162
Closed

one(::AbstractMatrix) always returns Array #54161

nsajko opened this issue Apr 20, 2024 · 0 comments · Fixed by #54162
Labels
arrays [a, r, r, a, y, s] maths Mathematical functions

Comments

@nsajko
Copy link
Contributor

nsajko commented Apr 20, 2024

It would be preferable to use similar instead of zeros, to allow various abstract array types to control the return type. Fix incoming.

@nsajko nsajko added the arrays [a, r, r, a, y, s] label Apr 20, 2024
nsajko added a commit to nsajko/julia that referenced this issue Apr 20, 2024
Don't force returning `Array`, basically.

Also generalized to non-one-indexed arrays.

Fixes JuliaLang#54161
@nsajko nsajko added the maths Mathematical functions label Apr 20, 2024
nsajko added a commit to nsajko/julia that referenced this issue Apr 20, 2024
@LilithHafner LilithHafner changed the title one(::AbstractMatrix) doesn't support offset arrays and always returns Array one(::AbstractMatrix) always returns Array Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] maths Mathematical functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant