Skip to content

Conversation

@forfudan
Copy link
Collaborator

@forfudan forfudan commented Mar 7, 2025

This pull request includes several changes to the mojoproject.toml file and the numojo package, focusing on improving the build process, testing, and formatting functionalities. Additionally, there are updates to the handling of print options in the numojo package.

Improvements to build and testing process:

  • mojoproject.toml: Updated the package task to include copying the package to the tests folder and modified the test task to test the built package.
  • mojoproject.toml: Simplified the final task to run format and test commands, and updated the f alias to run the final task.

Dependency updates:

Codebase simplification:

  • numojo/__init__.mojo, numojo/core/complex/complex_ndarray.mojo, numojo/routines/io/__init__.mojo: Removed the unused printoptions import. [1] [2] [3]
  • numojo/routines/io/formatting.mojo: Replaced GLOBAL_PRINT_OPTIONS with a local default_print_options instance in several functions and methods, and added new parameters to the format_floating_scientific and format_floating_precision functions for better control over formatting behavior. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

MadAlex1997 and others added 4 commits March 1, 2025 19:58
…d-Algorithms-group#224)

@shivasankarka @MadAlex1997, This is to pull the commits that were
directly made in `main` into `pre-0.7`.

No squash is needed.
…rithms-group#226)

This will:

1. Implemented `take_along_axis` function in
`numojo/routines/indexing.mojo`:
- Takes values from an input array along a specified axis based on
indices
   - Handles arrays of any dimension with axis specification
   - Supports broadcasting of indices when shapes don't exactly match
   - Includes proper error handling for invalid inputs

2. Created comprehensive test suite in
`tests/routines/test_indexing.mojo`:
   - Tests for arrays of different dimensions (1D, 2D, 3D)
   - Tests with various axis specifications (positive, negative indices)
   - Tests with different index types (int32, int64)
   - Verification against NumPy's implementation for correctness
@forfudan forfudan requested a review from shivasankarka March 7, 2025 23:51
@MadAlex1997 MadAlex1997 changed the base branch from pre-0.7 to main March 7, 2025 23:57
@MadAlex1997 MadAlex1997 merged commit f0dea37 into Mojo-Numerics-and-Algorithms-group:main Mar 7, 2025
2 checks passed
@forfudan forfudan deleted the work branch March 8, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants