You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[`6b360e5`](https://github.com/stdlib-js/stdlib/commit/6b360e548417af6331cee3ecad0f03f9203b9b16) - **refactor:** support dtype instances by normalizing provided dtypes to strings _(by Athan Reines)_
678
680
-[`322b8cb`](https://github.com/stdlib-js/stdlib/commit/322b8cb870769d9198ddbcd0b89610b185ab57ff) - **build:** ensure dtypes are strings _(by Athan Reines)_
679
681
-[`387beea`](https://github.com/stdlib-js/stdlib/commit/387beea5c84c7bd4f0aab41ec35e49819275c9b0) - **build:** ensure dtypes are strings _(by Athan Reines)_
680
682
-[`2a887b7`](https://github.com/stdlib-js/stdlib/commit/2a887b7eb76a7f0ecc48133049868395b90ff196) - **refactor:** support data type instances _(by Athan Reines)_
@@ -64,11 +69,14 @@ function empty( dtype, shape, order ) {
64
69
len=1;
65
70
st=[0];
66
71
}
67
-
if(dtype==='binary'){
72
+
dt=resolveStr(dtype);
73
+
if(dt==='binary'){
68
74
buf=allocUnsafe(len);
69
75
}else{
70
-
buf=emptyArray(len,dtype);
76
+
buf=emptyArray(len,dt);
71
77
}
78
+
// FIXME: add support for struct dtypes. Will need to do something similar to `array/empty` in so far as allocating an uninitialized array buffer, performing byte alignment, and creating a StructArray view atop the buffer.
0 commit comments