Skip to content

[RFC]: add array/base/reshape #20

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

Closed
kgryte opened this issue Feb 14, 2025 · 4 comments · Fixed by stdlib-js/stdlib#5639
Closed

[RFC]: add array/base/reshape #20

kgryte opened this issue Feb 14, 2025 · 4 comments · Fixed by stdlib-js/stdlib#5639
Assignees
Labels
difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. estimate: 2-4hrs Task which should take between 2 to 4 hours. Feature Task to add a new feature. ❌ No AI Not allowed to use AI.

Comments

@kgryte
Copy link
Member

kgryte commented Feb 14, 2025

Reshape an n-dimensional nested array into another m-dimensional having a desired shape.

Support specifying lexicographic/colexicographic iteration order.

Should verify that the output shape is compatible with the input shape (i.e., they have the same number of total elements).

Time estimate without AI: 4hrs
Time estimate with AI: 3hrs

@kgryte kgryte added difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. estimate: 2-4hrs Task which should take between 2 to 4 hours. Feature Task to add a new feature. labels Feb 14, 2025
@naterush naterush added the 🤖 AI Allowed to use AI. label Feb 17, 2025
@naterush naterush added ❌ No AI Not allowed to use AI. and removed 🤖 AI Allowed to use AI. ❌ No AI Not allowed to use AI. labels Feb 25, 2025
@headlessNode
Copy link
Member

@naterush I'm planning to work on this issue. The label needs updating.

An FYI: This issue would be good to compare with #19

@naterush naterush added the ❌ No AI Not allowed to use AI. label Feb 28, 2025
@headlessNode
Copy link
Member

PR: stdlib-js/stdlib#5639
Time till opening PR: 2hrs 46 mins
Loom recording: Link

@headlessNode
Copy link
Member

headlessNode commented Mar 1, 2025

Notes:

  • Time could've been reduced significantly if using AI. Once the main function logic was done, the multiple test cases and benchmark cases were fairly similar (only difference in shapes/dimensions, lexicographic/colexicographic) which would've made easy for AI to quickly implement, resulting in reduced time. This is, if the generated cases would require no refactoring which mostly is not the case.

@naterush naterush added ❌ No AI Not allowed to use AI. and removed ❌ No AI Not allowed to use AI. labels Mar 3, 2025
anandkaranubc pushed a commit to anandkaranubc/stdlib that referenced this issue Apr 9, 2025
PR-URL: stdlib-js#5639
Closes: stdlib-js/metr-issue-tracker#20
Co-authored-by: Athan Reines <[email protected]>
Reviewed-by: Athan Reines <[email protected]> 
Signed-off-by: Muhammad Haris <[email protected]>
Signed-off-by: Athan Reines <[email protected]>
@headlessNode
Copy link
Member

Post PR Review Notes:

  • As result of the code review, a couple of minor refactors were nothing related to the main function logic. Also, some additional test cases were added.

  • Additional time spent: 11 mins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. estimate: 2-4hrs Task which should take between 2 to 4 hours. Feature Task to add a new feature. ❌ No AI Not allowed to use AI.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants