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

Make resize() accept output from size() #1882

Closed
mightypenguin opened this issue Jun 11, 2020 · 2 comments
Closed

Make resize() accept output from size() #1882

mightypenguin opened this issue Jun 11, 2020 · 2 comments
Labels

Comments

@mightypenguin
Copy link

Something like this would be nice.
let mymatrix = matrix();
.... add things to mymatrix....
let s = size(mymatrix);
let n = matrix().resize(s);

@josdejong
Copy link
Owner

That's a very good point. I can hardly believe this limitation never occurred to me 😂 . Fixed via 6c7f4c8 (not yet published).

Note that alternatively you can use the resize function instead of the method which already works:

let s = math.size(mymatrix);
let n = math.resize(matrix, s);

@josdejong
Copy link
Owner

FYI: there is an open discussion about how we can make behavior of the size function and methods better consistent, see #1771.

@josdejong josdejong added the bug label Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants