{"id":44900094,"url":"https://github.com/scikit-plots/lightnumpy","last_synced_at":"2026-02-17T21:11:05.378Z","repository":{"id":267525216,"uuid":"901275566","full_name":"scikit-plots/lightnumpy","owner":"scikit-plots","description":"A lightweight version of NumPy or Cupy (or similar functionality).","archived":false,"fork":false,"pushed_at":"2025-11-03T16:59:59.000Z","size":468,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-26T14:55:28.784Z","etag":null,"topics":["cupy","lightnumpy","numcpp","numpy","python"],"latest_commit_sha":null,"homepage":"https://scikit-plots.github.io/dev/user_guide/__lightnumpy/index.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scikit-plots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["scikit-plots","numfocus"],"custom":"https://numfocus.org/donate-to-scikit-plots"}},"created_at":"2024-12-10T11:08:35.000Z","updated_at":"2025-03-28T20:24:54.000Z","dependencies_parsed_at":"2025-02-16T14:35:43.198Z","dependency_job_id":"820898c1-49c7-422d-9195-8a805fedd0fe","html_url":"https://github.com/scikit-plots/lightnumpy","commit_stats":null,"previous_names":["scikit-plots/lightnumpy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scikit-plots/lightnumpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-plots%2Flightnumpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-plots%2Flightnumpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-plots%2Flightnumpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-plots%2Flightnumpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scikit-plots","download_url":"https://codeload.github.com/scikit-plots/lightnumpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-plots%2Flightnumpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29558131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T20:52:40.164Z","status":"ssl_error","status_checked_at":"2026-02-17T20:48:10.325Z","response_time":100,"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":["cupy","lightnumpy","numcpp","numpy","python"],"created_at":"2026-02-17T21:11:04.376Z","updated_at":"2026-02-17T21:11:05.370Z","avatar_url":"https://github.com/scikit-plots.png","language":"Python","funding_links":["https://github.com/sponsors/scikit-plots","https://github.com/sponsors/numfocus","https://numfocus.org/donate-to-scikit-plots"],"categories":[],"sub_categories":[],"readme":"# LightNumPy\n\n**Lightweight and Fast Numerical Computing Library for Python**\n\nA lightweight version of NumPy or Cupy (or similar functionality).\n\n### Install|Try LightNumPy - Doc: https://scikit-plots.github.io/dev/devel/index.html\n\n## User Installation:\n\n### Installing from source (REQUIRED OS/LIB BUILD PACKAGES)\nYou can also install lightnumpy from source if you want to take advantage of the latest changes:\n```sh\n# Forked repo: https://github.com/scikit-plots/lightnumpy.git\ngit clone https://github.com/YOUR-USER-NAME/lightnumpy.git\ncd lightnumpy\n\nbash docker/script/safe_dirs.sh  # add safe directories for git\ngit submodule update --init  # download submodules\n\n# pip install -r ./requirements/all.txt\npip install -r ./requirements/build.txt\npip install --no-build-isolation --no-cache-dir -e . -v\n```\n\n### It is also possible to include optional dependencies:\n```sh\n# (Optionally) Try Development [dev,build,test,docs,gpu]\n## gpu refer NVIDIA CUDA support like cupy lib\npython -m pip install --no-build-isolation --no-cache-dir -e .[dev,build,test,docs] -v\n\n## gpu refer NVIDIA CUDA support like cupy lib\n# pip install \"lightnumpy[gpu]\"\n```\n\n### Installing using pip\n\nThe easiest way to set up LightNumPy is to install it using pip with the following command:\n\n- by `pypi`:\n  ```sh\n  pip install lightnumpy -U\n  ```\n\n- by `GITHUB` use `\u003cbranches\u003e` or `\u003ctags\u003e` If any:\n  - Branches:\n    ```bash\n    #pip install git+https://github.com/scikit-plots/scikit-plots.git@\u003cbranches\u003e\n    # Latest in Development with C,Cpp,Fortran Support\n    pip install git+https://github.com/scikit-plots/lightnumpy.git@main\n    pip install git+https://github.com/scikit-plots/lightnumpy.git@maintenance/0.0.x\n    ```\n  \u003cbr\u003e\n\n  - Tags:\n    ```bash\n    #pip install git+https://github.com/scikit-plots/scikit-plots.git@\u003ctags\u003e\n    pip install git+https://github.com/scikit-plots/lightnumpy.git@v0.0.x\n    ```\n\n---\n\n## Why LightNumPy?\n- **Performance-Driven**: Optimized for both CPU and hardware accelerators (GPU/TPU).\n- **Focused**: Includes essential features without unnecessary overhead.\n- **Adaptable**: Modular structure for customized extensions.\n- **Scalable**: Ideal for IoT, embedded systems, and resource-limited devices.\n\n## See Also\n- [1] https://scikit-plots.github.io/stable/api/scikitplot._numcpp_api.html\n- [2] https://github.com/dpilger26/NumCpp\n---\n\n## LightNumPy Project Structure\n\n```sh\nlightnumpy/\n│\n├── lightnumpy/                       # Core library source code\n│   ├── __init__.py                   # Main package initializer\n│   ├── .clang-format                 # Code formatting rules for C/C++, code formatting rules like braces placement, and spacing.\n│   ├── .clang-tidy                   # Code linting rules for C/C++, code analysis, warnings, and bug detection.\n│   ├── _core/                        # Low-level C and Higher-level C++ implementation sources\n│   │   ├── include/                  # C and C++ headers\n│   │   │   ├── lightnumpy            # lightnumpy core C and C++ headers\n│   │   │   └── NumCpp                # NumCpp Headers [2] immutable\n│   │   └── src/                      # C and C++ source files\n│   │       ├── dummymodule.c         # Sample Module\n│   │       ├── hello.c               # Print and string operations\n│   │       └── nc_version.cpp        # NumCpp Headers versions\n│   ├── _gpu_core/                    # GPU operations\n│   │   ├── include/                  # GPU headers\n│   │   │   ├── lightnumpy            # lightnumpy gpu core C and C++ headers as .cuh\n│   │   │   └── numC++                # numC++ Headers\n│   │   └── src/                      # GPU source files\n│   │       ├── gpu_ops.cu            # CUDA implementations\n│   │       └── cuda_helpers.cu       # CUDA utility functions\n│   ├── _tpu_core/                    # TPU operations\n│   │   ├── include/                  # TPU headers\n│   │   │   ├── tpu_ops.hpp           # TPU operation definitions\n│   │   │   └── tpu_helpers.hpp       # TPU helper utilities\n│   │   └── src/                      # TPU source files\n│   │       ├── tpu_ops.cpp           # TPU operation implementations (via XLA)\n│   │       └── tpu_helpers.cpp       # TPU utility functions\n│   ├── cy_bindings/                  # Cython implementation, Cython bridging native libraries with Python APIs\n│   │   ├── __init__.py               # Initialize the cython package\n│   │   ├── include/                  # Cython Headers\n│   │   └── src/                      # Cython Source files\n│   │       └── cython_helpers.pxd    # Shared Cython declarations (optional)\n│   ├── py_bindings/                  # Bindings for Python and native code, pybind11 bridging native libraries with Python APIs\n│   │   ├── include/                  # pybind11 Headers\n│   │   └── src/                      # pybind11 Source files\n│   │       ├── py_math.cpp           # Element-wise operations\n│   │       ├── py_nc_random          # Random array functionality pybind11 with NumCpp\n│   │       └── pybind_utils.cpp      # Helper functions for bindings\n│   ├── python_api/                   # Pure Python layer providing user-friendly interfaces for core functionality\n│   │   ├── __init__.py               # API entry point for `python_api`\n│   │   ├── _utils_impl.py            # get_include for lightnumpy library's C and C++ _core Headers with NumCpp Headers [2]\n│   │   ├── array.py                  # Array class implementation and basic methods\n│   │   ├── core.py                   # Contains core array functionality\n│   │   ├── linalg.py                 # Basic linear algebra operations (e.g., dot, transpose)\n│   │   ├── operations.py             # Element-wise operations (e.g., addition, multiplication) (CPU, GPU, TPU)\n│   │   ├── gpu_operations.py         # GPU-specific Python operations\n│   │   ├── tpu_operations.py         # TPU-specific Python operations\n│   │   └── utils.py                  # Utility functions for array manipulation\n│   └── tests/                        # Core library tests\n│       ├── test_array.py             # Test for array module\n│       ├── test_tensor.py            # Test for tensor module\n│       ├── test_gpu_ops.py           # Test for GPU operations\n│       ├── test_tpu_ops.py           # Test for TPU operations\n│       ├── test_cython_array.py      # Test for Cython array implementation\n│       └── test_cython_utils.py      # Test for Cython utility functions\n│\n├── examples/                         # Example usage and demos\n│   ├── array_example.py              # Example for arrays\n│   ├── tensor_example.py             # Example for tensors\n│   ├── gpu_example.py                # Example for GPU operations\n│   └── tpu_example.py                # Example for TPU operations\n│\n├── docs/                             # Documentation\n│   ├── index.md                      # Documentation index\n│   ├── api/                          # API reference\n│   │   ├── gpu_api.md                # GPU API documentation\n│   │   └── tpu_api.md                # TPU API documentation\n│   └── developer_guide.md            # Developer setup and guide\n│\n├── .github/                          # CI/CD configuration\n│   ├── issue_templates/              # GitHub issue templates\n│   └── workflows/                    # GitHub Actions workflows\n│       └── ci.yml                    # Main CI pipeline configuration\n│\n├── meson.build                       # Meson build configuration\n├── LICENSE                           # Project license\n├── pyproject.toml                    # Python project configuration\n└── README.md                         # Project overview\n├── setup.cfg                         # Optional Python packaging configuration\n```\n\n\n\u003c!-- --- --\u003e\n\n\u003c!-- ```sh\nmkdir lightnumpy\ncd lightnumpy\n\nmkdir -p lightnumpy/{python_api,c_core/include,c_core/src,cpp_core/include,cpp_core/src,gpu_core/include,gpu_core/src,tpu_core/include,tpu_core/src,bindings,tests}\n\ntouch meson.build pyproject.toml README.md\n\nmkdir -p .github/workflows\ntouch .github/workflows/ci.yml\n\nmkdir docs\ntouch docs/index.md\n\nmkdir examples\ntouch examples/{array_example.py,tensor_example.py,gpu_example.py,tpu_example.py}\n``` --\u003e\n\n---\n\n## FAQs\n\n#### Q: How does lightnumpy differ from numpy?\nA: While numpy is a full-featured numerical library, lightnumpy is a lightweight version, designed to be faster and more efficient for specific use cases. It focuses on essential features, leaving out less commonly used ones.\n\n#### Q: Is lightnumpy compatible with numpy?\n\nA: For most common operations, yes! It provides a familiar API to help you transition smoothly.\n\n#### Q: Can I use lightnumpy for GPU/TPU tasks?\n\nA: Absolutely! lightnumpy has built-in support for hardware accelerators.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-plots%2Flightnumpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscikit-plots%2Flightnumpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-plots%2Flightnumpy/lists"}