{"id":42667798,"url":"https://github.com/oboard/numoon","last_synced_at":"2026-01-29T10:13:01.574Z","repository":{"id":239412584,"uuid":"799246898","full_name":"oboard/numoon","owner":"oboard","description":"The fundamental package for scientific computing with MoonBit Lang.","archived":false,"fork":false,"pushed_at":"2026-01-25T14:04:00.000Z","size":140,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-26T06:35:07.172Z","etag":null,"topics":["moonbit","numoon"],"latest_commit_sha":null,"homepage":"","language":"MoonBit","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oboard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-11T15:09:53.000Z","updated_at":"2026-01-25T14:04:04.000Z","dependencies_parsed_at":"2024-06-17T03:43:42.924Z","dependency_job_id":"8e1954e7-b921-4063-b665-f610f22932d1","html_url":"https://github.com/oboard/numoon","commit_stats":null,"previous_names":["oboard/numoon"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oboard/numoon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fnumoon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fnumoon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fnumoon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fnumoon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oboard","download_url":"https://codeload.github.com/oboard/numoon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fnumoon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28875450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T09:47:23.353Z","status":"ssl_error","status_checked_at":"2026-01-29T09:47:19.357Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["moonbit","numoon"],"created_at":"2026-01-29T10:13:01.014Z","updated_at":"2026-01-29T10:13:01.565Z","avatar_url":"https://github.com/oboard.png","language":"MoonBit","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oboard/numoon\n\n## 📖Table of Contents\n\n- [Introduction](#-introduction)\n- [Getting Started](#-getting-started)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## ✨New Features\n\n```rust\ntest \"functions on arrays\" {\n  inspect!(\n    @nm.array([0.1, 0.2, 0.3])\n    .sin()\n    .cos()\n    .arccos()\n    .arcsin()\n    .multiply(10)\n    .round()\n    .divide(10),\n    content=\"[0.1,0.2,0.3]\",\n  )\n}\n\ntest \"slice\" {\n  let arr = @nm.array([1, 2, 3, 4, 5])\n  inspect!(arr[2:4], content=\"[3,4]\")\n}\n```\n\n## ✨Introduction\n\n**Numoon** is an open-source MoonBit library that provides support for multi-dimensional array objects and functions for efficiently operating on these arrays.\n\n\u003c!-- The core of Numoon is its N-dimensional array object NMArray, which is very similar to basic MoonBit lists but can store any data type and perform vectorized mathematical operations. This makes Numoon highly suitable for numerical computations. --\u003e\n\nHere are some key features of Numoon:\n\n1. Multi-dimensional Array Objects: Numoon provides a powerful N-dimensional array NMArray, which is the foundation for scientific computing.\n\n2. Derived Objects (such as Masked Arrays and Matrices): Numoon allows users to create special arrays, like masked arrays, which handle missing or invalid data.\n\n3. Extensive Mathematical Function Library: Numoon has a vast array of mathematical functions, including linear algebra, Fourier transforms, and random number generation.\n\u003c!--\n4. Vectorized Operations: Numoon's array operations are vectorized, meaning you can perform operations on arrays without explicit loops.\n\n5. Support for Various Data Types: Numoon supports a wide range of data types, including integers, floating-point numbers, complex numbers, and more.\n\n6. Operation Broadcasting: Numoon offers a powerful mechanism that allows arithmetic operations between arrays of different sizes.\n\n7. Memory Efficiency: Numoon arrays store data more efficiently than native MoonBit data structures.\n\n8. Tool Integration: Numoon is the foundation for many other scientific computing libraries, such as SciMoon, Moondas, and MoonPlotlib. --\u003e\n\nNumoon is an indispensable tool for scientific computing and data analysis in MoonBit, widely used in fields such as physics, biology, engineering, and more.\n\n## 🚀Getting Started\n\nTo get started with Numoon, you can simply install it using the following command:\n\n```bash\nmoon add oboard/numoon\n```\n\nConfigure your MoonBit project `moon.pkg.json` file:\n```json\n{\n  \"import\": [\n    {\n      \"path\": \"oboard/numoon/lib\",\n      \"alias\": \"nm\"\n    } \n  ]\n}\n```\n\nThis will install the latest version of Numoon and its dependencies.\n\nTo use Numoon in your MoonBit program, simply import the library using the following code:\n\nYou can then create an NMArray object using the following code:\n\n### Creating Arrays\n\n```moonbit\na = @nm.array([1, 2, 3])\nb = @nm.array([1, 2, 3])\nprintln(a + b)\n// Output: [2, 4, 6]\n```\n\n# Array Operations\n\n```moonbit\na = @nm.array([1, 2, 3])\nprintln(a.sum())\nprintln(a.prod())\n// Output: 6 6\n```\n\n### Reshape\n\n```moonbit\nlet a = @nm.array([[1, 2, 3], [4, 5, 6]])\nprintln(a.reshape(3, 2))\n// Output: [[1, 2], [3, 4], [5, 6]]\n```\n\n### Random Number Generation\n\n```moonbit\nlet list1 = @nm.rand(6)\nprintln(list1)\n// Output: [[0.2893123275883688, 0.33959090191249325, 0.1521095035725017],\n//  0.9314055834969763, 0.8561914513327412, 0.7919828439328577]\n```\n\n### Matrix\n\n```moonbit\nlet list1 = @nm.array([[1, 2, 3], [4, 5, 6]])\n```\n\n#### Matrix Operations\n\n```moonbit\nlet m2 = @nm.array([[1, 2, 3], [4, 5, 6]])\nlet m1 = @nm.array([[7, 8], [9, 10], [11, 12]])\n\nlet result = @nm.dot(m1, m2)\nprintln(result)\n\n// Output: [[121.0 136.0 151.0]\n//  [153.0 172.0 191.0]\n//  [185.0 208.0 231.0]]\n```\n\n#### Matrix Transpose\n\n```moonbit\nlet a = @nm.array([[1, 2], [3, 4]])\n\nprintln(a.transpose())\n\n// Output: [[1 3]\n//  [2 4]]\n```\n\n### linspace\n\nstart: The starting value of the sequence.\n\nstop: The ending value of the sequence.\n\n~num: The number of samples to generate, inclusive of both start and stop. Default is 50.\n\n```moonbit\nlet a = @nm.linspace(0.0, 10.0, num=11)\nprintln(a)\n\n// Output: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]\n```\n\n## 🤝Contributing\n\nWe welcome contributions to Numoon! Please read our [contribution guide](CONTRIBUTING.md) to learn more.\n\n## 👨‍💻Authors\n\n- @oboard\n- @Yorkin\n\n## 📝License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE.md](LICENSE.md) file for details.\n\n\n\nQQ 群号：**949886784**\n\n![QQ群](qrcode.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foboard%2Fnumoon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foboard%2Fnumoon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foboard%2Fnumoon/lists"}