[RFC]: replace `copyView` in `ndarray/array/lib/copy_view.js` with `ndarray/copy`
- 主要言語
- JavaScript
- スター
- 6k
- フォーク
- 1.3k
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 611
説明
**Description**
In `ndarray/array/lib/copy_view.js`, the `copyView` function manually creates an output buffer, constructs a plain ndarray-like
object, and uses `ndarray/base/assign` to copy data.
The function contains the following TODO comment:
```js
function copyView( arr, dtype ) { // TODO: consider replacing with `@stdlib/ndarray[/base]/copy` once created
```
Now that `ndarray/copy` exists, the manual logic can be replaced by importing `ndarray/copy`, removing the following unnecessary imports:
- `@stdlib/ndarray/base/assert/is-equal-data-type`
- `@stdlib/buffer/alloc-unsafe`
- `@stdlib/ndarray/base/buffer-ctors`
- `@stdlib/ndarray/order`
- `@stdlib/ndarray/base/numel`
- `@stdlib/ndarray/base/shape2strides`
- `@stdlib/ndarray/base/assign`
- `@stdlib/array/base/zeros`
コントリビューションガイド
調査の方向性
Start in ndarray/array/lib/copy_view.js and read the copyView function and its TODO. Replace the manual copying path with ndarray/copy, remove the listed unused imports, and confirm that copyView retains its existing behavior without those dependencies.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data
- issue の種類
- リファクタリング
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 55/100