You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.MD
+82-52Lines changed: 82 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,7 @@
4
4
5
5
NuMojo is a library for numerical computing in Mojo 🔥 similar to NumPy, SciPy in Python.
6
6
7
-
**[Explore the docs»](https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo-Examples-and-Benchmarks/blob/main/docs/README.md)****[Changelog»](https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo/blob/main/docs/changelog.md)****[Check out our Discord»](https://discord.com/channels/1149778565756366939/1149778566603620455)**
**[Explore the docs»](https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo-Examples-and-Benchmarks/blob/main/docs/README.md)** | **[Changelog»](https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo/blob/main/docs/changelog.md)** | **[Check out our Discord»](https://discord.gg/NcnSH5n26F)**
10
8
11
9
**Table of Contents**
12
10
@@ -22,65 +20,47 @@ NuMojo is a library for numerical computing in Mojo 🔥 similar to NumPy, SciPy
22
20
23
21
## About the project
24
22
25
-
***What NuMojo is***
23
+
NuMojo aims to encompass the extensive numerics capabilities found in Python packages such as NumPy, SciPy, and Scikit-learn.
26
24
27
-
NuMojo intends to capture a wide swath of numerics capability present in the Python packages NumPy, SciPy, and Scikit.
25
+
=======
28
26
29
-
NuMojo intends to try and get the most out of the capabilities of Mojo including vectorization, parallelization, and GPU acceleration (once available). Currently, NuMojo extends (most of) the standard library math functions to work on array inputs.
27
+
***What NuMojo is***
30
28
31
-
We intend NuMojo to be a building block for other Mojo packages that need fast math under the hood without the added weight of a ML back and forward propagation system
29
+
We seek to harness the full potential of Mojo, including vectorization, parallelization, and GPU acceleration (when available). Currently, NuMojo extends most (if not all) standard library math functions to support array inputs.
32
30
33
-
***What NuMojo is not***
31
+
Our vision for NuMojo is to serve as an essential building block for other Mojo packages needing fast math operations, without the additional weight of a machine learning back-propagation system.
34
32
35
-
NuMojo is not a machine learning library, it will never include back-propagation in the base library.
33
+
***What NuMojo is not***
36
34
37
-
## Goals and features
35
+
NuMojo is not a machine learning library and will never include back-propagation as part of the base library.
38
36
39
-
Our main goal is to implement a fast, comprehensive numerics library in Mojo.
37
+
## Features and goals
40
38
41
-
Following are some brief long-term goals. Some of them have already been implementedor partially implemented.
39
+
Our primary objective is to develop a fast, comprehensive numerics library in Mojo. Below are some features and long-term goals. Some have already been implemented, either fully or partially.
var A = nm.full[cf32](Shape(1000, 1000), fill_value=complexscalar)
166
+
# Create complex array filled with (1 + 1j)
167
+
var B = nm.ones[cf32](Shape(1000, 1000))
168
+
169
+
# Print array
170
+
print(A)
171
+
172
+
# Array slicing
173
+
var A_slice = A[1:3, 4:19]
174
+
175
+
# Array multiplication
176
+
var C = A * B
177
+
178
+
# Get scalar from array
179
+
var A_item = A[item(291, 141)]
180
+
# Set an element of the array
181
+
A[item(291, 141)] = complexscalar
171
182
```
172
183
173
184
## How to install
174
185
175
-
There are two approach to install and use the Numojo package.
186
+
There are three approach to install and use the Numojo package.
187
+
188
+
### Use magic CLI
189
+
190
+
You can use the following command in the terminal to install `numojo`.
191
+
192
+
```console
193
+
magic add numojo
194
+
```
195
+
196
+
### Add in toml file
197
+
198
+
You can add `numojo` in the dependencies section of your toml file.
199
+
200
+
```toml
201
+
[dependencies]
202
+
numojo = "==0.5"
203
+
```
176
204
177
205
### Build package
178
206
179
-
This approach invovles building a standalone package file `mojopkg`.
207
+
This approach involves building a standalone package file `mojopkg`.
180
208
181
209
1. Clone the repository.
182
-
2. Build the package using `mojo package numojo`
183
-
3. Move the numojo.mojopkg into the directory containing the your code.
210
+
2. Build the package using `magic run package`.
211
+
3. Move the `numojo.mojopkg` into the directory containing the your code.
184
212
185
213
### Include NuMojo's path for compiler and LSP
186
214
187
-
This approach does not require buiding a package file. Instead, when you compile your code, you can include the path of NuMojo reporsitory with the following command:
215
+
This approach does not require building a package file. Instead, when you compile your code, you can include the path of NuMojo repository with the following command:
188
216
189
217
```console
190
218
mojo run -I "../NuMojo" example.mojo
@@ -213,6 +241,8 @@ This library is still very much a work in progress and may change at any time.
213
241
214
242
Distributed under the Apache 2.0 License with LLVM Exceptions. See [LICENSE](https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo/blob/main/LICENSE) and the LLVM [License](https://llvm.org/LICENSE.txt) for more information.
215
243
244
+
This project includes code from [Mojo Standard Library](https://github.com/modularml/mojo), licensed under the Apache License v2.0 with LLVM Exceptions (see the LLVM [License](https://llvm.org/LICENSE.txt)). MAX and Mojo usage and distribution are licensed under the [MAX & Mojo Community License](https://www.modular.com/legal/max-mojo-license).
245
+
216
246
## Acknowledgements
217
247
218
248
Built in native [Mojo](https://github.com/modularml/mojo) which was created by [Modular](https://github.com/modularml).
0 commit comments