Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitea70574

Browse files
committed
Auto-generated commit
1 parent7fee715 commitea70574

File tree

3 files changed

+9
-101
lines changed

3 files changed

+9
-101
lines changed

‎dist/index.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@stdlib/buffer-alloc-unsafe":"^0.1.0",
4949
"@stdlib/constants-float64-pinf":"^0.1.1",
5050
"@stdlib/math-base-assert-is-integer":"^0.1.1",
51-
"@stdlib/math-base-special-abs":"^0.1.0",
51+
"@stdlib/math-base-special-abs":"^0.1.1",
5252
"@stdlib/ndarray-base-assert-is-allowed-data-type-cast":"^0.1.0",
5353
"@stdlib/ndarray-base-assert-is-casting-mode":"^0.1.1",
5454
"@stdlib/ndarray-base-assert-is-data-type":"^0.1.0",
@@ -59,7 +59,7 @@
5959
"@stdlib/ndarray-base-numel":"^0.1.1",
6060
"@stdlib/ndarray-base-shape2strides":"^0.1.1",
6161
"@stdlib/ndarray-base-strides2offset":"^0.1.1",
62-
"@stdlib/ndarray-base-strides2order":"^0.1.0",
62+
"@stdlib/ndarray-base-strides2order":"^0.1.1",
6363
"@stdlib/ndarray-ctor":"^0.1.0",
6464
"@stdlib/ndarray-data-buffer":"github:stdlib-js/ndarray-data-buffer#main",
6565
"@stdlib/ndarray-defaults":"^0.1.1",
@@ -106,7 +106,8 @@
106106
"multidimensional",
107107
"dimensions",
108108
"dims",
109-
"numpy.array"
109+
"numpy.array",
110+
"numpy.asarray"
110111
],
111112
"__stdlib__": {},
112113
"funding": {

‎test/dist/test.js‎

Lines changed: 4 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
*@license Apache-2.0
33
*
4-
* Copyright (c)2018 The Stdlib Authors.
4+
* Copyright (c)2023 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,106 +21,13 @@
2121
// MODULES //
2222

2323
vartape=require('tape');
24-
varndarray=require('./../../dist');
24+
varmain=require('./../../dist');
2525

2626

2727
// TESTS //
2828

29-
tape('main export isa function',functiontest(t){
29+
tape('main export isdefined',functiontest(t){
3030
t.ok(true,__filename);
31-
t.strictEqual(typeofndarray,'function','main export isa function');
31+
t.strictEqual(main!==void0,true,'main export isdefined');
3232
t.end();
3333
});
34-
35-
tape('the function throws an error if provided an options argument which is not an object',functiontest(t){
36-
varvalues;
37-
vari;
38-
39-
values=[
40-
'5',
41-
5,
42-
NaN,
43-
true,
44-
false,
45-
null,
46-
void0,
47-
functionnoop(){}
48-
];
49-
50-
for(i=0;i<values.length;i++){
51-
t.throws(badValue(values[i]),TypeError,'throws an error when provided '+values[i]);
52-
}
53-
t.end();
54-
55-
functionbadValue(value){
56-
returnfunctionbadValue(){
57-
ndarray(value);
58-
};
59-
}
60-
});
61-
62-
tape('the function throws an error if not provided either a `shape` or `buffer` option',functiontest(t){
63-
t.throws(badValue({}),Error,'throws an error when not provided either a `shape` or `buffer` option');
64-
t.end();
65-
66-
functionbadValue(value){
67-
returnfunctionbadValue(){
68-
ndarray(value);
69-
};
70-
}
71-
});
72-
73-
tape('the function throws an error if provided an invalid option',functiontest(t){
74-
varvalues;
75-
vari;
76-
77-
values=[
78-
'5',
79-
'beep',
80-
'boop',
81-
'foo',
82-
'bar',
83-
5,
84-
NaN,
85-
true,
86-
false,
87-
null,
88-
void0,
89-
[],
90-
{},
91-
functionnoop(){}
92-
];
93-
94-
for(i=0;i<values.length;i++){
95-
t.throws(badValue(values[i]),TypeError,'throws an error when provided '+values[i]);
96-
}
97-
t.end();
98-
99-
functionbadValue(value){
100-
returnfunctionbadValue(){
101-
varopts={
102-
'shape':[3,2],
103-
'dtype':value
104-
};
105-
ndarray(opts);
106-
};
107-
}
108-
});
109-
110-
tape('the function throws an error if provided a `shape` option which is incompatible with a provided buffer',functiontest(t){
111-
varopts={
112-
'dtype':'generic',
113-
'shape':[3,3],
114-
'buffer':[1,2,3,4,5,6]
115-
};
116-
t.throws(badValue(opts),Error,'throws an error when provided incompatible `shape` and `buffer` options');
117-
t.end();
118-
119-
functionbadValue(value){
120-
returnfunctionbadValue(){
121-
ndarray(value);
122-
};
123-
}
124-
});
125-
126-
// TODO: tests

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp