Mojo-Numerics-and-Algorithms-group / NuMojo

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

Better internal documentation and fixing the Bool bitpacking issue #65

Closed MadAlex1997 closed 2 months ago

MadAlex1997 commented 2 months ago

Added style guide and example for review and workshopping.

Fixed the bool bit packing issue between SIMD and DTypePointer, by using simd_strided_store, allowing backends to be applied to comparison operations. Added specific path in astype to convert to `NDArray[DType.bool].

This should open the door for masking operations.

forFudan commented 2 months ago

Since we do not use tensor anymore. It would be nice to replace all tensor with simd in the files.

MadAlex1997 commented 2 months ago

Since we do not use tensor anymore. It would be nice to replace all tensor with simd in the files.

It wouldn't be simd it would be some variation of array as those functions take one or more arrays as inputs. When I try to do mass replace across the code base it breaks stuff in a way that doesn't make sense, it complains nonspecifically about trait conformance.

So this change would be manual, and references to tensor are literally all over the code base.

forFudan commented 2 months ago

Then let's leave it into future and gradually change the names.