mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-26 10:42:51 +00:00
* add type definition numjs * move ndtype from ndarry to numjs, remove unnecessary comments * remote jsdoc annotations
24 lines
424 B
TypeScript
24 lines
424 B
TypeScript
import { abs } from 'numjs';
|
|
import * as nj from 'numjs';
|
|
|
|
const a = abs(2);
|
|
|
|
const arr = nj.arange(6);
|
|
arr.reshape(1, 2, 3);
|
|
// array([[[ 0, 1, 2],
|
|
// [ 3, 4, 5]]])
|
|
arr.T;
|
|
// array([[[ 0],
|
|
// [ 3]],
|
|
// [[ 1],
|
|
// [ 4]],
|
|
// [[ 2],
|
|
// [ 5]]])
|
|
arr.transpose(1, 0, 2);
|
|
// array([[[ 0, 1, 2]],
|
|
// [[ 3, 4, 5]]])
|
|
|
|
const b = nj.array([2, 3, 4]);
|
|
|
|
const c = nj.uint8([1, 2, 3]);
|