blitz icon indicating copy to clipboard operation
blitz copied to clipboard

Feature Request: Reshape Arrays

Open aaronmswan opened this issue 7 years ago • 3 comments

Reshaping arrays would be a useful feature. Reshape would involve adjusting dimensions such that the product of the dimension does not change, and would not move memory. This would be different than resizeAndPreserve.

It looks like this was considered a while back: https://sourceforge.net/p/blitz/mailman/message/2406484/

aaronmswan avatar Oct 12 '18 16:10 aaronmswan

See the "reshape()" macro at:

https://github.com/citibeth/ibmisc/blob/develop/slib/ibmisc/blitz.hpp

Maybe some of this stuff should be incorporated directly into Blitz?

On Fri, Oct 12, 2018 at 12:04 PM aaronmswan [email protected] wrote:

Reshaping arrays would be a useful feature. Reshape would involve adjusting dimensions such that the product of the dimension does not change, and would not move memory. This would be different than resizeAndPreserve.

It looks like this was considered a while back: https://sourceforge.net/p/blitz/mailman/message/2406484/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blitzpp/blitz/issues/89, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1cd3Ju-PBuxjsI_dqFT-XAE-ApZAIYks5ukL1rgaJpZM4XZwXf .

citibeth avatar Oct 12 '18 16:10 citibeth

Thank you for pointing that out. That looks like what I was hoping for.

I think it does make sense for blitz to have this functionality, and maybe the similar ravel function as in the python numpy module.

aaronmswan avatar Oct 12 '18 17:10 aaronmswan

I agree with @aaronmswan, it would be useful to have features such as reshape, squeeze, extend dimension, etc.

annemenini avatar Aug 14 '19 23:08 annemenini