[RFC]: add `ndarray/tensor3d/ctor`
メンテナーはふだん 1 日以内に返信
@0PrashantYadav0 がすでに取り組んでいます。
2026年9月4日 から。
評価
この issue はまだ評価されていません。
説明
Description
This RFC proposes adding @stdlib/ndarray/tensor3d/ctor, the three-dimensional counterpart to the existing @stdlib/ndarray/vector/ctor and @stdlib/ndarray/matrix/ctor packages, as the next step toward providing dedicated dimensional constructors up to five dimensions.
Motivation
As with ndarray/vector/* and ndarray/matrix/*, these APIs provide convenient dedicated interfaces for constructing arrays of a known dimensionality from nested arrays, together with the corresponding validation. For example,
var x = new Float64Tensor3D( [ [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], [ [ 7, 8, 9 ], [ 10, 11, 12 ] ] ] );
// returns <ndarray>
Dimensional constructors up to 5D cover more than 80% of end-user use cases for ndarray dimensionality. Arrays of six or more dimensions are markedly less common and are adequately served by the general-purpose @stdlib/ndarray/ctor and @stdlib/ndarray/array APIs.
Supported options (readonly, mode, submode, order) and their defaults are unchanged from matrix/ctor.
Future plan
This RFC covers tensor3d/ctor and the typed constructors. The sequence:
- The parent
@stdlib/ndarray/tensor3dnamespace package — handled separately by a maintainer. Not done here. - Typed 3D constructors — done. The complete set matching
vector:bool(BooleanTensor3D),complex64,complex128,float32,float64,int8,int16,int32,uint8,uint8c(Uint8ClampedTensor3D),uint16,uint32. Each is a thin wrapper overrequire( '@stdlib/ndarray/tensor3d/ctor' ).factory( dtype )accompanied by documentation, types, tests, and benchmarks. ndarray/tensor4d— constructor plus typed packages, using@stdlib/array/base/flatten4d.ndarray/tensor5d— constructor plus typed packages, using@stdlib/array/base/flatten5d, completing coverage through five dimensions.
Constructor names follow the vector convention rather than a literal data type transliteration: bool exports BooleanTensor3D and uint8c exports Uint8ClampedTensor3D. Package descriptions use the repository's dominant phrasing for integer types ("signed 32-bit integer", used by 39 packages) rather than the inverted form used by matrix/int32 and two others.
Related Issues
None.
Questions
No.
Three questions were raised while drafting and have since been resolved by a maintainer:
- Should the thin parent
@stdlib/ndarray/tensor3dnamespace package land together withtensor3d/ctor? — No. It will be handled separately by a maintainer. - Should the typed constructors mirror the
matrixset or the broadervectorset? — The full set, matchingvector. Work is already in progress to bring thematrixnamespace up to the complete set. - Should the
from_arraybuffer.jsTODObe tackled as part of this work? — No. Work on@stdlib/ndarray/from-arraybufferis already in progress separately; copying the helper is acceptable for now.
Other
No.
Checklist
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:.
- 主要言語
- JavaScript
- スター
- 6k
- フォーク
- 1.3k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 586
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stdlib-js/stdlib のほかの issue
-
Fix JavaScript lint errors対応中かも @lb1192176991-lab が 1 日前に担当しました。 オープンGood First Issue
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
stdlib-js/stdlib#15831 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
`@stdlib/string/base/percent-encode` produces malformed encoding and silently drops characters対応中かも @barbierajput378-pixel が 6 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
stdlib-js/stdlib#15595 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: kumaraswamy/kurtosis returns non-excess kurtosis (missing −3)対応中かも @Planeshifter が 6 日前に担当しました。 オープンBug Statistics
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stdlib-js/stdlib#15461 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: rayleigh/mgf returns wrong values due to misplaced parenthesis対応中かも @anandkaranubc が 8 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stdlib-js/stdlib#15456 · コメント 6 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
@stdlib/array/fixed-endian-factory allows misaligned byte offsets and fractional lengths対応中かも @kanikasharma-18 が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
stdlib-js/stdlib#15193 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
stdlib-js/stdlib の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
neondatabase/website#6038 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Effect-TS/effect#8728 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[quality] coverage gate exits 0 when the test run is killed by a signal (tests/tools/coverage-report.mjs:680 `?? 1` is untested)対応中かも @hivecommons-hive が今日担当しました。 オープンagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信