-
Notifications
You must be signed in to change notification settings - Fork 64
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
should users know about similar
?
#1940
Comments
similar
should not produce illegal matricessimilar
?
On Fri, Dec 20, 2024 at 03:31:08AM -0800, Tommy Hofmann wrote:
```
julia> b = matrix(ZZ, 2, 2, [i for i in 1:4])
[1 2]
[3 4]
julia> c = similar(b)
[#undef #undef]
[#undef #undef]
julia> c == c
ERROR: UndefRefError: access to undefined reference
```
If this is not a bug but on purpose, I propose that we change it back. I don't think we should have any user-facing function producing illegal matrix objects.
Here of course, this is trivial. But how do I get an non-initialized
matrix (to save time)? generically?
… --
Reply to this email directly or view it on GitHub:
#1940
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
So yeah, this was/is intentional -- matching precisely what Julia does. My view is this: the function I don't understand why this should be a problem either: Regular users won't use |
My original phrasing was not optimal and I have reformulated it. I don't mind that this functionality exists. But in my opinion, the whole notion of (For julia |
I don't feel too comfortable that a user-facing function produces illegal (useless for most purposes) matrices. I understand the Base array has the same "feature", but our matrices should be mathematical things, where this seems problematic for a user.
The text was updated successfully, but these errors were encountered: