Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jul 21, 2023
1 parent f7e25b8 commit 1c2c038
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
# Publish package to npm:
- name: 'Publish package to npm'
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
Expand Down
19 changes: 12 additions & 7 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,37 @@
# Contributors listed in alphabetical order.

Ali Salesi <[email protected]>
Amit Jimiwal <[email protected]>
Athan Reines <[email protected]>
Brendan Graetz <[email protected]>
Bruno Fenzl <[email protected]>
Christopher Dambamuromo <[email protected]>
Dan Rose <[email protected]>
Dominik Moritz <[email protected]>
Dorrin Sotoudeh <[email protected]>
Frank Kovacs <[email protected]>
Harshita Kalani <[email protected].com>
James <[email protected]>
Harshita Kalani <harshitakalani02@gmail.com>
James Gelok <[email protected]>
Jithin KS <[email protected]>
Joey Reed <[email protected]>
Jordan-Gallivan <[email protected]>
Jordan Gallivan <[email protected]>
Joris Labie <[email protected]>
Justin Dennison <[email protected]>
Marcus <[email protected]>
Marcus Fantham <[email protected]>
Matt Cochrane <[email protected]>
Milan Raj <[email protected]>
Momtchil Momtchev <[email protected]>
Naresh Jagadeesan <[email protected]>
Nithin Katta <[email protected]>
Ognjen Jevremović <[email protected]>
Philipp Burckhardt <[email protected]>
Pranav <[email protected]>
Pranav Goswami <[email protected]>
Ricky Reusser <[email protected]>
Roman Stetsyk <[email protected]>
Ryan Seal <[email protected]>
Seyyed Parsa Neshaei <[email protected]>
Shraddheya Shendre <[email protected]>
Stephannie Jiménez Gacha <[email protected]>
Yernar Yergaziyev <[email protected]>
dorrin-sot <[email protected]>
orimiles5 <[email protected]>
rei2hu <[email protected]>
rei2hu <[email protected]>
6 changes: 4 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var isAllowedCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-c
var createBuffer = require( '@stdlib/ndarray-base-buffer' );
var getType = require( '@stdlib/ndarray-base-buffer-dtype' );
var arrayShape = require( '@stdlib/array-shape' );
var flattenArray = require( '@stdlib/utils-flatten-array' );
var flatten = require( '@stdlib/array-base-flatten' );
var format = require( '@stdlib/string-format' );
var isArrayLikeObject = require( './is_array_like_object.js' );
var getDefaults = require( './defaults.js' );
Expand Down Expand Up @@ -122,6 +122,7 @@ function array() {
var ndims;
var nopts;
var opts;
var osh;
var len;
var ord;
var FLG;
Expand Down Expand Up @@ -280,6 +281,7 @@ function array() {
len = buffer.length;
} else if ( opts.flatten && isArray( buffer ) ) {
shape = arrayShape( buffer );
osh = shape; // cache a reference to the inferred shape
ndims = shape.length;
len = numel( shape );
} else {
Expand Down Expand Up @@ -313,7 +315,7 @@ function array() {
}
} else if ( buffer ) {
if ( btype === 'generic' && opts.flatten ) {
buffer = flattenArray( buffer );
buffer = flatten( buffer, osh || arrayShape( buffer ), false );
}
if ( buffer.length !== len ) {
throw new RangeError( 'invalid arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"url": "https://github.com/stdlib-js/stdlib/issues"
},
"dependencies": {
"@stdlib/array-base-flatten": "github:stdlib-js/array-base-flatten#main",
"@stdlib/array-shape": "^0.0.6",
"@stdlib/assert-has-own-property": "^0.0.7",
"@stdlib/assert-is-array": "^0.0.7",
Expand All @@ -62,8 +63,7 @@
"@stdlib/ndarray-ctor": "^0.0.10",
"@stdlib/ndarray-defaults": "github:stdlib-js/ndarray-defaults#main",
"@stdlib/string-format": "^0.0.3",
"@stdlib/types": "^0.0.14",
"@stdlib/utils-flatten-array": "^0.0.7"
"@stdlib/types": "^0.0.14"
},
"devDependencies": {
"@stdlib/array-float32": "^0.0.6",
Expand Down

0 comments on commit 1c2c038

Please sign in to comment.