diff --git a/CHANGELOG.md b/CHANGELOG.md index 990b731ad..9d1aba447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ##### Features +- [`31aa8db`](https://github.com/stdlib-js/stdlib/commit/31aa8dbfb2c0a722710adc8a399e703b224cadab) - add `transposeOperations` to namespace - [`378240f`](https://github.com/stdlib-js/stdlib/commit/378240f1bb93253435f89aec4d5c7ce64eae4703) - update namespace @@ -629,6 +630,7 @@ This release closes the following issue: ##### Bug Fixes +- [`258cc06`](https://github.com/stdlib-js/stdlib/commit/258cc060947be206b283ff4d066953dcebb0143f) - assign enum values to CBLAS compatible aliases - [`0992fe2`](https://github.com/stdlib-js/stdlib/commit/0992fe22060cb8f860cfd9e8f590d4c7a83c7287) - replace semicolons with commas @@ -675,6 +677,28 @@ This release closes the following issue: +
+ +#### [@stdlib/blas/base/transpose-operations](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/transpose-operations) + +
+ +
+ +##### Features + +- [`87a0d77`](https://github.com/stdlib-js/stdlib/commit/87a0d77b81cc5bc8c05e40d6ec22f548c5d3dd14) - add `blas/base/transpose-operations` + +
+ + + +
+ +
+ + +
#### [@stdlib/blas/base/xerbla](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/xerbla) @@ -1517,6 +1541,10 @@ A total of 35 people contributed to this release. Thank you to the following con
+- [`73cf5f1`](https://github.com/stdlib-js/stdlib/commit/73cf5f1bb0dba7e320518e6b530a98004ef86aef) - **refactor:** assign enum values to CBLAS compatible aliases _(by Athan Reines)_ +- [`258cc06`](https://github.com/stdlib-js/stdlib/commit/258cc060947be206b283ff4d066953dcebb0143f) - **fix:** assign enum values to CBLAS compatible aliases _(by Athan Reines)_ +- [`31aa8db`](https://github.com/stdlib-js/stdlib/commit/31aa8dbfb2c0a722710adc8a399e703b224cadab) - **feat:** add `transposeOperations` to namespace _(by Athan Reines)_ +- [`87a0d77`](https://github.com/stdlib-js/stdlib/commit/87a0d77b81cc5bc8c05e40d6ec22f548c5d3dd14) - **feat:** add `blas/base/transpose-operations` _(by Athan Reines)_ - [`85ec173`](https://github.com/stdlib-js/stdlib/commit/85ec1734c06b80b13eb607576e592414047c90a7) - **remove:** delete `blas/base/orders` _(by Athan Reines)_ - [`c61cc17`](https://github.com/stdlib-js/stdlib/commit/c61cc17ca682a9dfe76246ab9dc852c0044c6cbf) - **refactor:** migrate to `blas/base/layouts` _(by Athan Reines)_ - [`0c3213e`](https://github.com/stdlib-js/stdlib/commit/0c3213e4e3219c0574d0c49e2486db1ac714c952) - **fix:** rename `orders` to `layouts` _(by Athan Reines)_ diff --git a/base/lib/index.js b/base/lib/index.js index b19535de2..1f028ec86 100644 --- a/base/lib/index.js +++ b/base/lib/index.js @@ -333,6 +333,15 @@ setReadOnly( blas, 'sscal', require( './../../base/sscal' ) ); */ setReadOnly( blas, 'sswap', require( './../../base/sswap' ) ); +/** +* @name transposeOperations +* @memberof blas +* @readonly +* @type {Function} +* @see {@link module:@stdlib/blas/base/transpose-operations} +*/ +setReadOnly( blas, 'transposeOperations', require( './../../base/transpose-operations' ) ); + /** * @name zcopy * @memberof blas diff --git a/base/shared/include/stdlib/blas/base/shared/cblas.h b/base/shared/include/stdlib/blas/base/shared/cblas.h index 6358f17c4..e58e7468f 100644 --- a/base/shared/include/stdlib/blas/base/shared/cblas.h +++ b/base/shared/include/stdlib/blas/base/shared/cblas.h @@ -23,6 +23,7 @@ #include #include #include "stdlib/blas/base/orders.h" +#include "stdlib/blas/base/transpose_operations.h" /* * If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler. @@ -65,20 +66,26 @@ extern "C" { // Array storage layout: #ifndef CBLAS_LAYOUT -typedef STDLIB_BLAS_LAYOUT CBLAS_LAYOUT; +typedef enum CBLAS_LAYOUT { + // Row-major order (C-style): + CblasRowMajor = STDLIB_BLAS_ROW_MAJOR, + + // Column-major order (Fortran-style): + CblasColMajor = STDLIB_BLAS_COLUMN_MAJOR, +} CBLAS_LAYOUT; #endif // Transpose operation: #ifndef CBLAS_TRANSPOSE typedef enum CBLAS_TRANSPOSE { // No transposition: - CblasNoTrans = 111, + CblasNoTrans = STDLIB_BLAS_NO_TRANSPOSE, // Transposition: - CblasTrans = 112, + CblasTrans = STDLIB_BLAS_TRANSPOSE, // Conjugate transposition: - CblasConjTrans = 113, + CblasConjTrans = STDLIB_BLAS_CONJUGATE_TRANSPOSE, } CBLAS_TRANSPOSE; #endif diff --git a/base/shared/manifest.json b/base/shared/manifest.json index 880829967..b8e8beb87 100644 --- a/base/shared/manifest.json +++ b/base/shared/manifest.json @@ -33,7 +33,8 @@ "libraries": [], "libpath": [], "dependencies": [ - "@stdlib/blas/base/layouts" + "@stdlib/blas/base/layouts", + "@stdlib/blas/base/transpose-operations" ] } ] diff --git a/base/transpose-operations/README.md b/base/transpose-operations/README.md new file mode 100644 index 000000000..f0a6823fa --- /dev/null +++ b/base/transpose-operations/README.md @@ -0,0 +1,188 @@ + + +# Transpose Operations + +> BLAS transpose operations. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var transposeOperations = require( '@stdlib/blas/base/transpose-operations' ); +``` + +#### transposeOperations() + +Returns a list of BLAS transpose operations. + +```javascript +var out = transposeOperations(); +// e.g., returns [ 'none', 'transpose', 'conjugate-transpose' ] +``` + +The output array contains the following operations: + +- `none`: no transposition. +- `transpose`: transposition. +- `conjugate-transpose`: conjugate transposition. + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var contains = require( '@stdlib/array/base/assert/contains' ).factory; +var transposeOperations = require( '@stdlib/blas/base/transpose-operations' ); + +var isOp = contains( transposeOperations() ); + +var bool = isOp( 'transpose' ); +// returns true + +bool = isOp( 'conjugate-transpose' ); +// returns true + +bool = isOp( 'beep' ); +// returns false +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/blas/base/transpose_operations.h" +``` + +#### STDLIB_BLAS_TRANSPOSE_OPERATION + +An enumeration of BLAS transpose operations with the following fields: + +- **STDLIB_BLAS_NO_TRANSPOSE**: no transposition. +- **STDLIB_BLAS_TRANSPOSE**: transposition. +- **STDLIB_BLAS_CONJUGATE_TRANSPOSE**: conjugate transposition. + +```c +#include "stdlib/blas/base/transpose_operations.h" + +const enum STDLIB_BLAS_TRANSPOSE_OPERATION op = STDLIB_BLAS_TRANSPOSE; +``` + +
+ + + + + +
+ +### Notes + +- Enumeration constants should be considered opaque values, and one should **not** rely on specific integer values. + +
+ + + + + +
+ +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/base/transpose-operations/benchmark/benchmark.js b/base/transpose-operations/benchmark/benchmark.js new file mode 100644 index 000000000..5fd5f7fc2 --- /dev/null +++ b/base/transpose-operations/benchmark/benchmark.js @@ -0,0 +1,48 @@ +/** +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives; +var pkg = require( './../package.json' ).name; +var ops = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var out; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = ops(); + if ( out.length < 2 ) { + b.fail( 'should return an array' ); + } + } + b.toc(); + if ( !isStringArray( out ) ) { + b.fail( 'should return an array of strings' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/base/transpose-operations/docs/repl.txt b/base/transpose-operations/docs/repl.txt new file mode 100644 index 000000000..232752a45 --- /dev/null +++ b/base/transpose-operations/docs/repl.txt @@ -0,0 +1,23 @@ + +{{alias}}() + Returns a list of transpose operations. + + The output array contains the following operations: + + - none: no transposition. + - transpose: transposition. + - conjugate-transpose: conjugate transposition. + + Returns + ------- + out: Array + List of operations. + + Examples + -------- + > var out = {{alias}}() + [ 'none', 'transpose', 'conjugate-transpose' ] + + See Also + -------- + diff --git a/base/transpose-operations/docs/types/index.d.ts b/base/transpose-operations/docs/types/index.d.ts new file mode 100644 index 000000000..63deecf47 --- /dev/null +++ b/base/transpose-operations/docs/types/index.d.ts @@ -0,0 +1,35 @@ +/* +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Returns a list of transpose operations. +* +* @returns list of transpose operations +* +* @example +* var list = transposeOperations(); +* // e.g., returns [ 'none', 'transpose', 'conjugate-transpose' ] +*/ +declare function transposeOperations(): Array; + + +// EXPORTS // + +export = transposeOperations; diff --git a/base/transpose-operations/docs/types/test.ts b/base/transpose-operations/docs/types/test.ts new file mode 100644 index 000000000..fffc6e734 --- /dev/null +++ b/base/transpose-operations/docs/types/test.ts @@ -0,0 +1,32 @@ +/* +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import transposeOperations = require( './index' ); + + +// TESTS // + +// The function returns an array of strings... +{ + transposeOperations(); // $ExpectType string[] +} + +// The compiler throws an error if the function is provided any arguments... +{ + transposeOperations( 9 ); // $ExpectError +} diff --git a/base/transpose-operations/examples/index.js b/base/transpose-operations/examples/index.js new file mode 100644 index 000000000..e31a30d6a --- /dev/null +++ b/base/transpose-operations/examples/index.js @@ -0,0 +1,36 @@ +/** +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var contains = require( '@stdlib/array/base/assert/contains' ).factory; +var transposeOperations = require( './../lib' ); + +var isOp = contains( transposeOperations() ); + +var bool = isOp( 'transpose' ); +console.log( bool ); +// => true + +bool = isOp( 'conjugate-transpose' ); +console.log( bool ); +// => true + +bool = isOp( 'beep' ); +console.log( bool ); +// => false diff --git a/base/transpose-operations/include/stdlib/blas/base/transpose_operations.h b/base/transpose-operations/include/stdlib/blas/base/transpose_operations.h new file mode 100644 index 000000000..ecda6168c --- /dev/null +++ b/base/transpose-operations/include/stdlib/blas/base/transpose_operations.h @@ -0,0 +1,36 @@ +/** +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef STDLIB_BLAS_BASE_TRANSPOSE_OPERATIONS_H +#define STDLIB_BLAS_BASE_TRANSPOSE_OPERATIONS_H + +/** +* Enumeration of array transpose operations. +*/ +enum STDLIB_BLAS_TRANSPOSE_OPERATION { + // No transposition: + STDLIB_BLAS_NO_TRANSPOSE = 111, + + // Transposition: + STDLIB_BLAS_TRANSPOSE = 112, + + // Conjugate transposition: + STDLIB_BLAS_CONJUGATE_TRANSPOSE = 113 +}; + +#endif // !STDLIB_BLAS_BASE_TRANSPOSE_OPERATIONS_H diff --git a/base/transpose-operations/lib/enum.js b/base/transpose-operations/lib/enum.js new file mode 100644 index 000000000..1f49e2d74 --- /dev/null +++ b/base/transpose-operations/lib/enum.js @@ -0,0 +1,54 @@ +/** +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MAIN // + +/** +* Returns an object mapping supported transpose operations to integer values for purposes of C inter-operation. +* +* ## Notes +* +* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `transpose == 112`). Instead, the object should be used in an opaque manner. +* - The main purpose of this function is JavaScript and C inter-operation of array objects. +* +* @returns {Object} object mapping supported transpose operations to integer values +* +* @example +* var table = enumerated(); +* // returns +*/ +function enumerated() { + // NOTE: the following should match the C `transpose_operations.h` enumeration!!!! + return { + // No transposition: + 'none': 111, + + // Transposition: + 'transpose': 112, + + // Conjugate transposition: + 'conjugate-transpose': 113 + }; +} + + +// EXPORTS // + +module.exports = enumerated; diff --git a/base/transpose-operations/lib/index.js b/base/transpose-operations/lib/index.js new file mode 100644 index 000000000..505018e18 --- /dev/null +++ b/base/transpose-operations/lib/index.js @@ -0,0 +1,47 @@ +/** +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Return a list of BLAS transpose operations. +* +* @module @stdlib/blas/base/transpose-operations +* +* @example +* var transposeOperations = require( '@stdlib/blas/base/transpose-operations' ); +* +* var list = transposeOperations(); +* // e.g., returns [ 'none', 'transpose', 'conjugate-transpose' ] +*/ + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var main = require( './main.js' ); +var enumeration = require( './enum.js' ); + + +// MAIN // + +setReadOnly( main, 'enum', enumeration ); + + +// EXPORTS // + +module.exports = main; diff --git a/base/transpose-operations/lib/main.js b/base/transpose-operations/lib/main.js new file mode 100644 index 000000000..4da4fdb07 --- /dev/null +++ b/base/transpose-operations/lib/main.js @@ -0,0 +1,44 @@ +/** +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var OPS = require( './ops.json' ); + + +// MAIN // + +/** +* Returns a list of BLAS transpose operations. +* +* @returns {StringArray} list of transpose operations +* +* @example +* var list = layouts(); +* // e.g., returns [ 'none', 'transpose', 'conjugate-transpose' ] +*/ +function layouts() { + return OPS.slice(); +} + + +// EXPORTS // + +module.exports = layouts; diff --git a/base/transpose-operations/lib/ops.json b/base/transpose-operations/lib/ops.json new file mode 100644 index 000000000..cbd4baddc --- /dev/null +++ b/base/transpose-operations/lib/ops.json @@ -0,0 +1,5 @@ +[ + "none", + "transpose", + "conjugate-transpose" +] diff --git a/base/transpose-operations/manifest.json b/base/transpose-operations/manifest.json new file mode 100644 index 000000000..f95ad4962 --- /dev/null +++ b/base/transpose-operations/manifest.json @@ -0,0 +1,36 @@ +{ + "options": {}, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "src": [], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + } + ] +} diff --git a/base/transpose-operations/package.json b/base/transpose-operations/package.json new file mode 100644 index 000000000..7429ce81a --- /dev/null +++ b/base/transpose-operations/package.json @@ -0,0 +1,71 @@ +{ + "name": "@stdlib/blas/base/transpose-operations", + "version": "0.0.0", + "description": "List of BLAS transpose operations.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdtypes", + "types", + "blas", + "transpose", + "transposition", + "operation", + "c", + "fortran", + "multidimensional", + "ndarray", + "array", + "utilities", + "utility", + "utils", + "util" + ], + "__stdlib__": {} +} diff --git a/base/transpose-operations/test/test.js b/base/transpose-operations/test/test.js new file mode 100644 index 000000000..2a9635624 --- /dev/null +++ b/base/transpose-operations/test/test.js @@ -0,0 +1,75 @@ +/** +* @license Apache-2.0 +* +* 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. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var hasOwnProp = require( '@stdlib/assert/has-own-property' ); +var isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive; +var transposeOperations = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof transposeOperations, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a list of transpose operations', function test( t ) { + var expected; + var actual; + + expected = [ + 'none', + 'transpose', + 'conjugate-transpose' + ]; + actual = transposeOperations(); + + t.deepEqual( actual, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'attached to the main function is an `enum` method to return an object mapping operations to integer values for C inter-operation', function test( t ) { + var obj; + var o; + var i; + + t.strictEqual( hasOwnProp( transposeOperations, 'enum' ), true, 'has property' ); + t.strictEqual( typeof transposeOperations.enum, 'function', 'has method' ); + + obj = transposeOperations.enum(); + t.strictEqual( typeof obj, 'object', 'returns expected value type' ); + + // List of values which should be supported... + o = [ + 'none', + 'transpose', + 'conjugate-transpose' + ]; + for ( i = 0; i < o.length; i++ ) { + t.strictEqual( hasOwnProp( obj, o[ i ] ), true, 'has property `' + o[ i ] + '`' ); + t.strictEqual( isNonNegativeInteger( obj[ o[i] ] ), true, 'returns expected value' ); + } + + t.end(); +});