Daniel Strobusch
Daniel Strobusch
Would be great to find the answer from #86 in the documentation/wiki.
A ndarray like type for swift would be great! Some features of NymPy's array would be great to see: * contiguous and non contiguous array handling * array slices with...
@Datamance note that Accelerate is using BLAS and LAPACK under the hood, so I think there is nothing wrong with that approach. Surge does have quite good linear algebra support!...
MLX is pretty nice, except that it has only a C++ and python interface, which makes it hard to use with Swift. Also it is only available on Apple Silicon...
@ManishAradwad, I suggest considering the file at https://github.com/ml-explore/mlx/blob/b1441d14013ea1f2cee0e3a799a25f1bcfedefe6/python/src/array.cpp#L688 as a potential starting point. Rather than generating the default string representation, it might be more appropriate to create a formatted representation....
I recently discovered that the MLX approach for accomplishing this task is as follows: ```python model.apply(lambda x: x.astype(mx.float16)) ``` Given that parameters are initialized lazily, it seems unnecessary to pass...
I would anticipate that both `to` and `astype` functions would return a copy of the module casted to the correct type, mirroring the behavior seen in arrays. While this holds...
In the NumPy world, I would opt for a more generic approach: ```py def set_dtype(self, dtype, predicate = lambda x: mx.issubdtype(x, mx.floating)): self.apply(lambda x: x.astype(dtype) if predicate(x.dtype) else x) ```...
@ziqianggeoffreychen I think you should create a PR for this - as you put quite some effort into the analysis. Probably creating a test case for this will be the...