[RFC]: add float16 support across the `@stdlib/ndarray` namespace
- Langage dominant
- JavaScript
- Étoiles
- 6k
- Forks
- 1.3k
- Merge moyen
- 1 j 3 h
- PR mergées (30 j)
- 611
Description
### Description
This issue tracks the work required to complete first-class `float16` data type integration across the `@stdlib/ndarray` namespace.
Foundational core registries (such as `dtypes`, `dtype-ctors`, `safe-casts`, `same-kind-casts`, `mostly-safe-casts`, and `promotion-rules`) have already been updated to support the new `float16` type. Because of this:
1. **Only 5 packages require runtime code modifications (logic changes)** to support `float16`.
2. **All other pending packages work automatically** at runtime via delegation to the already-updated foundational utilities. However, they still require JSDoc example additions, TypeScript declaration updates (`docs/types/index.d.ts`), README modifications, and test suite coverage expansion to explicitly verify and document `float16` / `Float16Array` support.
Below is the complete hierarchical and alphabetical list of packages in the namespace, annotated with their status and task type.
## Package Checklist
- [ ] **`@stdlib/ndarray`** (Top-Level Namespace)
- [ ] `@stdlib/ndarray/broadcast-scalar-like` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/casting-modes`
- [ ] `@stdlib/ndarray/data-buffer` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/dtypes`
- [ ] `@stdlib/ndarray/empty` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/empty-like` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/filter` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/filter-map` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/find` — **(Requires Code Changes)**
- [ ] `@stdlib/ndarray/for-each` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/from-scalar` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/from-scalar-like` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/index-modes`
- [x] `@stdlib/ndarray/input-casting-policies`
- [ ] `@stdlib/ndarray/map` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/min-dtype` — **(Requires Code Changes)**
- [x] `@stdlib/ndarray/mostly-safe-casts`
- [ ] `@stdlib/ndarray/nans` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/nans-like` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/next-dtype`
- [ ] `@stdlib/ndarray/ones` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/ones-like` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/orders`
- [x] `@stdlib/ndarray/output-dtype-policies`
- [x] `@stdlib/ndarray/promotion-rules`
- [ ] `@stdlib/ndarray/reject` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/safe-casts`
- [x] `@stdlib/ndarray/same-kind-casts`
- [ ] `@stdlib/ndarray/slice` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/slice-dimension-from` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/slice-dimension-to` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/slice-from` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/slice-to` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/to-locale-string` — **(Requires Code Changes)**
- [ ] `@stdlib/ndarray/to-string` — **(Requires Code Changes)**
- [ ] `@stdlib/ndarray/zeros` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/zeros-like` — *(Docs & Tests Only)*
---
- [ ] **`@stdlib/ndarray/base`** (Base Operations Sub-Namespace)
- [ ] `@stdlib/ndarray/base/broadcast-scalar` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/base/buffer-ctors`
- [x] `@stdlib/ndarray/base/buffer-dtype`
- [x] `@stdlib/ndarray/base/buffer-dtype-enum`
- [x] `@stdlib/ndarray/base/bytes-per-element`
- [x] `@stdlib/ndarray/base/char2dtype`
- [ ] `@stdlib/ndarray/base/ctor` — **(Requires Code Changes)**
- [ ] `@stdlib/ndarray/base/data-buffer` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/base/dtype-alignment`
- [x] `@stdlib/ndarray/base/dtype-char`
- [x] `@stdlib/ndarray/base/dtype-chars`
- [x] `@stdlib/ndarray/base/dtype-desc`
- [x] `@stdlib/ndarray/base/dtype-enum2str`
- [x] `@stdlib/ndarray/base/dtype-enums`
- [x] `@stdlib/ndarray/base/dtype-objects`
- [x] `@stdlib/ndarray/base/dtype-resolve-enum`
- [x] `@stdlib/ndarray/base/dtype-resolve-str`
- [x] `@stdlib/ndarray/base/dtype-str2enum`
- [x] `@stdlib/ndarray/base/dtype-strings`
- [x] `@stdlib/ndarray/base/dtype2c`
- [ ] `@stdlib/ndarray/base/empty` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/empty-like` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/from-array` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/from-scalar` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/full` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/full-by` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/nans` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/nans-like` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/base/ndarraylike2object`
- [ ] `@stdlib/ndarray/base/ones` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/ones-like` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/base/output-dtype`
- [ ] `@stdlib/ndarray/base/slice` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/slice-assign` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/slice-dimension` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/slice-dimension-from` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/slice-dimension-to` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/slice-from` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/slice-to` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/transpose` — *(Docs & Tests Only)*
- [x] `@stdlib/ndarray/base/unary-input-casting-dtype`
- [ ] `@stdlib/ndarray/base/zeros` — *(Docs & Tests Only)*
- [ ] `@stdlib/ndarray/base/zeros-like` — *(Docs & Tests Only)*
### Related Issues
Related issues # , # , and # .
### Questions
No.
### Other
No.
### Checklist
- [x] I have read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
- [x] Searched for existing issues and pull requests.
- [x] The issue name begins with `RFC:`.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start with the unchecked packages in the @stdlib/ndarray and @stdlib/ndarray/base checklists, separating the five marked as requiring code changes from those marked docs and tests only. Review docs/types/index.d.ts and the existing package JSDoc, README, and tests, using the updated foundational dtype registries as the runtime baseline. Done means the listed packages explicitly support and test float16/Float16Array, with declarations and documentation updated.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, typescript
- Domaine
- data
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100