|
1 | | -<br/> |
2 | | -<p align="center"> |
3 | | -<!-- If we add a logo in future --> |
4 | | - <!-- <a href=""> |
5 | | - <img src="" alt="Logo" width="200" height="200"> |
6 | | - </a> --> |
7 | | - |
8 | | - <h1 align="center">NuMojo</h1> |
| 1 | +<a name="readme-top"></a> |
| 2 | +<!-- add these later --> |
| 3 | +<!-- [![MIT License][license-shield]][] --> |
| 4 | + |
| 5 | +<div align="center"> |
| 6 | + <a href=""> |
| 7 | + <img src="./assets/numojo_logo.png" alt="Logo" width="350" height="350"> |
| 8 | + </a> |
| 9 | + |
| 10 | + <h1 align="center" style="font-size: 3em; color: white; font-family: 'Avenir'; text-shadow: 1px 1px orange;">NuMojo</h1> |
| 11 | + |
9 | 12 | <p align="center"> |
10 | | - NuMojo is a library for numerical computing in Mojo 🔥 similar to numpy in Python. |
| 13 | + NuMojo is a library for numerical computing in Mojo 🔥 similar to NumPy, SciPy in Python. |
| 14 | + <br /> |
| 15 | + <!-- when we create docs --> |
| 16 | + <a href="https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo-Examples-and-Benchmarks/blob/main/docs/README.md"><strong>Explore the docs» </strong></a> |
| 17 | + <br /> |
| 18 | + <!-- <br /> --> |
| 19 | + <!-- <a href="">View Demo</a> |
| 20 | + · |
| 21 | + <a href="">Report Bug</a> |
| 22 | + · |
| 23 | + <a href="">Request Feature</a> --> |
11 | 24 | </p> |
12 | | -</p> |
| 25 | +</div> |
| 26 | + |
| 27 | +<details> |
| 28 | + <summary>Table of Contents</summary> |
| 29 | + <ol> |
| 30 | + <li> |
| 31 | + <a href="#about-the-project">About The Project</a> |
| 32 | + <ul> |
| 33 | + <li><a href="#what-numojo-is"> What NuMojo is </a></li> |
| 34 | + <li><a href="#what-numojo-is-not">What NuMojo is not</a></li> |
| 35 | + </ul> |
| 36 | + </li> |
| 37 | + <a href="#goals-roadmap">Goals/Roadmap</a> |
| 38 | + <ul> |
| 39 | + <li><a href="#long-term-goals">Long term goals</a></li> |
| 40 | + </ul> |
| 41 | + <li><a href="#usage">Usage</a></li> |
| 42 | + <li><a href="#how-to-install">How to install</a></li> |
| 43 | + <li><a href="#contributing">Contributing</a></li> |
| 44 | + <li><a href="#warnings">Warnings</a></li> |
| 45 | + <li><a href="#license">License</a></li> |
| 46 | + <li><a href="#acknowledgments">Acknowledgments</a></li> |
| 47 | + </ol> |
| 48 | +</details> |
13 | 49 |
|
14 | 50 | ## About the project |
| 51 | + |
| 52 | +### What NuMojo is |
| 53 | + |
15 | 54 | NuMojo intends to capture a wide swath of numerics capability present in the Python packages NumPy, SciPy and Scikit. |
16 | 55 |
|
| 56 | +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 tensor inputs. |
17 | 57 | 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 tensor inputs. |
18 | 58 |
|
19 | 59 | NuMojo intends 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 |
20 | 60 |
|
21 | | -## What NuMojo is not |
| 61 | +### What NuMojo is not |
22 | 62 |
|
23 | 63 | NuMojo is not a machine learning library, it will never include back-propagation in the base library. |
24 | 64 |
|
25 | 65 | ## Goals / Roadmap |
26 | 66 |
|
27 | | -For a detailed roadmap, please check [here](Roadmap.md) |
| 67 | +For a detailed roadmap, please refer to the [Roadmap.md](Roadmap.md) file. |
| 68 | + |
| 69 | +Our main goal is to implement a fast, comprehensive numerics library in Mojo. Following are some brief long-term goals, |
28 | 70 |
|
29 | 71 | ### Long term goals |
30 | | -* Linear/Tensor Algebra |
31 | | - * Native array types |
32 | | - * Vectorized, Parallelized math operations |
33 | | - * Array manipulation - vstack, slicing, concat etc. |
| 72 | + |
| 73 | +* Linear Algebra |
| 74 | + * Native n-dimensional array types |
| 75 | + * Vectorized, Parallelized math operations |
| 76 | + * Array manipulation - vstack, slicing, concat etc. |
34 | 77 | * Calculus |
35 | | - * Integration |
36 | | - * Derivates |
| 78 | + * Integration & Derivatives etc |
37 | 79 | * Optimizers |
38 | 80 | * Function approximators |
| 81 | +* Sorting |
39 | 82 |
|
40 | 83 | ## Usage |
41 | 84 |
|
42 | | -For now |
| 85 | +An example goes as follows. |
43 | 86 |
|
44 | 87 | ```mojo |
45 | | -import numojo |
46 | | -from tensor import Tensor |
47 | | -def main(): |
48 | | - var tens = Tensor[DType.float32](10,10) |
49 | | - tens=tens+numojo.pi/2 |
50 | | - print(numojo.sin[DType.float32](tens)) |
| 88 | +import numojo as nm |
| 89 | +
|
| 90 | +fn main() raises: |
| 91 | + # Generate two 1000x1000 matrices with random float64 values |
| 92 | + var A = nm.NDArray[nm.f64](shape=List[Int](1000,1000), random=True) |
| 93 | + var B = nm.NDArray[nm.f64](1000,1000, random=True) |
| 94 | +
|
| 95 | + # Print AB |
| 96 | + print(nm.linalg.matmul_parallelized(A, B)) |
51 | 97 | ``` |
52 | 98 |
|
53 | | -Please find all the available functions [here](Features.md) |
| 99 | +Please find all the available functions [here](features.md) |
54 | 100 |
|
55 | 101 | ## How to install |
56 | 102 |
|
57 | 103 | Clone the repository and build |
58 | 104 |
|
| 105 | +## Contributing |
| 106 | + |
| 107 | +Any contributions you make are **greatly appreciated**. For more details and guidelines on contributions, please check [here](CONTRIBUTING.md) |
| 108 | + |
59 | 109 | ## Warnings |
60 | 110 |
|
61 | 111 | This library is still very much a work in progress and may change at any time. Also, the standard tensor has many rough edges. |
62 | 112 |
|
| 113 | +## License |
| 114 | + |
| 115 | +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. |
| 116 | + |
63 | 117 | ## Acknowledgements |
64 | 118 |
|
65 | | -* Built in native [Mojo](https://github.com/modularml/mojo) created by [Modular](https://github.com/modularml) |
| 119 | +* Built in native [Mojo](https://github.com/modularml/mojo) which was created by [Modular](https://github.com/modularml) |
0 commit comments