stdlib-js / stdlib-js/stdlib

[RFC]: add float16 support across the `@stdlib/ndarray` namespace

Đang mở
#14,240 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Accepted Feature Maintainers RFC Tracking Issue
Ngôn ngữ chính
JavaScript
Star
6k
Fork
1.3k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
611

Mô tả

### 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:`.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, typescript
Lĩnh vực
data
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.