Mojo-Numerics-and-Algorithms-group / NuMojo

NuMojo is a library for numerical computing in Mojo 🔥 similar to numpy in Python.
Apache License 2.0
112 stars 15 forks source link

New additions and fixed typos #91

Closed shivasankarka closed 2 months ago

shivasankarka commented 3 months ago
forFudan commented 3 months ago

I have one suggestion on the name of the function: use numojo.sort() instead of numojo.sorted(). This means that when the function is a function, it first creates a copy and then make the in-place sort; when the function is a method of NDArray, it just conduct an in-place sort of the array itself. That is:

var arr_sorted = nj.sort(ar) # creates a new array and sorts it

shivasankarka commented 3 months ago

@forFudan Yes, you are right, I forgot to make that change. I will change it in the PR.