{"id":21056222,"url":"https://github.com/christophercrouzet/nani","last_synced_at":"2026-04-14T17:32:22.136Z","repository":{"id":57444794,"uuid":"71777411","full_name":"christophercrouzet/nani","owner":"christophercrouzet","description":"Alternative approach to defining and viewing NumPy's arrays.","archived":false,"fork":false,"pushed_at":"2017-05-15T16:36:10.000Z","size":99,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-29T19:26:59.958Z","etag":null,"topics":["dtype","nani","numpy","view","wrap"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christophercrouzet.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-24T10:19:32.000Z","updated_at":"2020-09-23T06:41:51.000Z","dependencies_parsed_at":"2022-09-26T17:30:35.849Z","dependency_job_id":null,"html_url":"https://github.com/christophercrouzet/nani","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/christophercrouzet/nani","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fnani","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fnani/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fnani/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fnani/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christophercrouzet","download_url":"https://codeload.github.com/christophercrouzet/nani/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fnani/sbom","scorecard":{"id":281138,"data":{"date":"2025-08-11","repo":{"name":"github.com/christophercrouzet/nani","commit":"296ae50c0cdcfd3ed0cba23a4d2edea0d124bcb1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T15:53:52.112Z","repository_id":57444794,"created_at":"2025-08-17T15:53:52.112Z","updated_at":"2025-08-17T15:53:52.112Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31808505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["dtype","nani","numpy","view","wrap"],"created_at":"2024-11-19T16:49:28.050Z","updated_at":"2026-04-14T17:32:22.119Z","avatar_url":"https://github.com/christophercrouzet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Nani\n====\n\n.. image:: https://img.shields.io/travis/christophercrouzet/nani/master.svg\n   :target: https://travis-ci.org/christophercrouzet/nani\n   :alt: Build status\n\n.. image:: https://img.shields.io/coveralls/christophercrouzet/nani/master.svg\n   :target: https://coveralls.io/r/christophercrouzet/nani\n   :alt: Coverage Status\n\n.. image:: https://img.shields.io/pypi/v/nani.svg\n   :target: https://pypi.python.org/pypi/nani\n   :alt: PyPI latest version\n\n.. image:: https://readthedocs.org/projects/nani/badge/?version=latest\n   :target: https://nani.readthedocs.io\n   :alt: Documentation status\n\n.. image:: https://img.shields.io/pypi/l/nani.svg\n   :target: https://pypi.python.org/pypi/nani\n   :alt: License\n\n\nNani is a Python library that provides an alternative approach to defining and\nviewing `NumPy`_'s arrays.\n\nUpon getting started with NumPy, the rules to define |numpy.dtype|_ objects\ntend to quickly become *confusing*. Not only different syntaxes can create a\nsame data type, but it also seems *arbitrary* and hence *difficult* to remember\nthat sub-array data types can only be defined as tuples while structured data\ntypes exclusively require lists made of field tuples, and so on.\n\nTo address this point, Nani takes the stance of offering one—and only one—way\nof constructing ``numpy.dtype`` objects. Although this syntax makes the code\nmore verbose, it also makes it easier to read and to reason about.\n\nNani's approach allows **type introspection** which brings additional benefits\nin the form of dynamically generated **default values** and **view types**.\nDefault values facilitate the definition of new array elements while view types\nare useful to encapsulate interactions with NumPy and to expose a different\npublic interface to your library users instead of the one provided with\n``numpy.ndarray``.\n\n\nFeatures\n--------\n\n* explicit syntax for defining ``numpy.dtype`` objects.\n* generates default values and view types.\n* allows for type introspection.\n\n\nUsage\n-----\n\n.. code-block:: python\n\n   \u003e\u003e\u003e import numpy\n   \u003e\u003e\u003e import nani\n   \u003e\u003e\u003e color_type = nani.Array(\n   ...     element_type=nani.Number(type=numpy.uint8, default=255),\n   ...     shape=3,\n   ...     view=None)\n   \u003e\u003e\u003e dtype, default, view = nani.resolve(color_type, name='Color')\n   \u003e\u003e\u003e a = numpy.array([default] * 2, dtype=dtype)\n   \u003e\u003e\u003e v = view(a)\n   \u003e\u003e\u003e for color in v:\n   ...     print(color)\n   [255, 255, 255]\n   [255, 255, 255]\n\n\nThe ``color_type`` above defines an array of 3 ``numpy.uint8`` elements having\neach a default value of ``255``. The resulting ``dtype`` and ``default``\nobjects are used to initialize a new NumPy array of 10 color elements, while\nthe ``view`` type is used to wrap that array into a standard collection\ninterface.\n\n\nSee the `Tutorial`_ section from the documentation for more detailed examples\nand explanations on how to use Nani.\n\n\nDocumentation\n-------------\n\nRead the documentation online at `nani.readthedocs.io`_ or check its source in\nthe ``doc`` directory.\n\n\nOut There\n---------\n\nProjects using Nani include:\n\n* `hienoi \u003chttps://github.com/christophercrouzet/hienoi\u003e`_\n\n\nAuthor\n------\n\nChristopher Crouzet\n\u003c`christophercrouzet.com \u003chttps://christophercrouzet.com\u003e`_\u003e\n\n\n.. |numpy.dtype| replace:: ``numpy.dtype``\n\n.. _nani.readthedocs.io: https://nani.readthedocs.io\n.. _NumPy: http://www.numpy.org\n.. _numpy.dtype: https://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html\n.. _Tutorial: https://nani.readthedocs.io/en/latest/tutorial.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophercrouzet%2Fnani","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristophercrouzet%2Fnani","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophercrouzet%2Fnani/lists"}