Skip to content

feat: add boolean dtype support to ndarray/base/buffer-dtype #2572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions lib/node_modules/@stdlib/ndarray/base/buffer-dtype/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,17 @@ var bufferCtors = require( '@stdlib/ndarray/base/buffer-ctors' );
var isFunction = require( '@stdlib/assert/is-function' );
var dtype = require( '@stdlib/ndarray/base/buffer-dtype' );

var DTYPES;
var ctor;
var buf;
var len;
var dt;
var i;

// Get a list of supported ndarray buffer data types:
DTYPES = dtypes();
var DTYPES = dtypes();

// Buffer length:
len = 10;
var len = 10;

// For each supported data type, create a buffer and confirm its data type...
var ctor;
var buf;
var dt;
var i;
for ( i = 0; i < DTYPES.length; i++ ) {
ctor = bufferCtors( DTYPES[ i ] );
if ( DTYPES[ i ] === 'binary' && isFunction( ctor.alloc ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,17 @@ var bufferCtors = require( '@stdlib/ndarray/base/buffer-ctors' );
var isFunction = require( '@stdlib/assert/is-function' );
var dtype = require( './../lib' );

var DTYPES;
var ctor;
var buf;
var len;
var dt;
var i;

// Get a list of supported ndarray buffer data types:
DTYPES = dtypes();
var DTYPES = dtypes();

// Buffer length:
len = 10;
var len = 10;

// For each supported data type, create a buffer and confirm its data type...
var ctor;
var buf;
var dt;
var i;
for ( i = 0; i < DTYPES.length; i++ ) {
ctor = bufferCtors( DTYPES[ i ] );
if ( DTYPES[ i ] === 'binary' && isFunction( ctor.alloc ) ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +35,8 @@ var dtypes = {
'Uint8Array': 'uint8',
'Uint8ClampedArray': 'uint8c',
'Complex64Array': 'complex64',
'Complex128Array': 'complex128'
'Complex128Array': 'complex128',
'BooleanArray': 'bool'
};


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,6 +31,7 @@ var Uint8ClampedArray = require( '@stdlib/array/uint8c' );
var Int8Array = require( '@stdlib/array/int8' );
var Complex64Array = require( '@stdlib/array/complex64' );
var Complex128Array = require( '@stdlib/array/complex128' );
var BooleanArray = require( '@stdlib/array/bool' );


// MAIN //
Expand All @@ -47,7 +48,8 @@ var CTORS = [
Uint8Array,
Uint8ClampedArray,
Complex64Array,
Complex128Array
Complex128Array,
BooleanArray
];


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,8 @@ var DTYPES = [
'uint8',
'uint8c',
'complex64',
'complex128'
'complex128',
'bool'
];


Expand Down
Loading