--- id: array-api-strict version: "2.6.1" license: Copyright (c) 2021-2024, NumPy Developers, Consortium for Python Data API Standards All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted… (full text in the JSON record) license_treatment: permissive maintenance: active --- # array-api-strict — A strict, minimal implementation of the Python array API standard. License: permissive · Maintenance: active · Downloads: 183.4K/mo ## What it is and what it does array-api-strict is a reference implementation of the Python array API standard designed specifically for testing, not for end-user consumption. It wraps numpy to provide a strict, minimal interface that conforms to the array API specification. The package is intended to be used in test suites of libraries that consume the array API—such as machine learning frameworks or scientific computing packages—to verify that their code will work correctly across different array libraries (NumPy, CuPy, PyTorch, etc.) without relying on library-specific features. The package is not meant to replace numpy or other array libraries for production use, nor to be added as a dependency to consuming libraries themselves. Instead, it serves as a validation tool: by running tests against array-api-strict, developers can confirm their array API usage is portable and standards-compliant. It supports Python 3.10 and later, has low install friction (only numpy as a runtime dependency), and is actively maintained. Use it for: - Test array API compliance in a library's test suite to ensure code works across NumPy, CuPy, PyTorch, and other array libraries. - Validate that a consuming library does not accidentally use non-standard array operations or library-specific features. - Develop array-agnostic code by testing against a strict reference implementation before deploying to production. - Verify portability of numerical algorithms across different array backends during development. - Catch array API violations early in the development cycle before releasing a library. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a strict, minimal implementation of the Python array API standard for testing whether consuming libraries use the array API portably, built on numpy. Yes, if you are developing a library that consumes the array API and want to verify your code is portable across array libraries. Install it as a test-time dependency only, not as a runtime dependency. It is not intended for end-users of array libraries or for production use. ## Install pip install array-api-strict uv add array-api-strict poetry add array-api-strict ## Installing array-api-strict Before you install: Low friction install with a single runtime dependency (numpy). Actively maintained with a recent release (18 days ago) and ongoing commits. License in practice: BSD license (permissive); you can use, modify, and distribute this package with minimal restrictions, provided you retain copyright notices and disclaimers. Quickstart: pip install array-api-strict import array_api_strict as xp # Use in test suite to validate array API compliance x = xp.asarray([1, 2, 3]) result = xp.sum(x) Requires Python 3.10 or later. Verify before relying: - Whether this package is actively used in test suites of major array-consuming libraries. - How complete the array API implementation is relative to the full standard specification. ## Package facts - License: Copyright (c) 2021-2024, NumPy Developers, Consortium for Python Data API Standards All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 183.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags array api standard implementation, test array api compliance, portable array library testing, python array api strict, array api validation, numpy array api wrapper, array api conformance testing, array-api, testing, standards-compliance [View on SkillFed](https://skillfed.io/packages/array-api-strict) · [View on PyPI](https://pypi.org/project/array-api-strict/)