diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 86e611a..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/count-truthy) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 90efbf0..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/count-truthy) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 776420c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '25 13 * * 1' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n +``` -```javascript -var countTruthy = require( '@stdlib/ndarray-count-truthy' ); +If no recognized module system is present, access bundle contents via the global scope: + +```html + ``` #### countTruthy( x\[, options] ) @@ -221,8 +227,13 @@ var v = ndarray2array( y ); -```javascript -var bernoulli = require( '@stdlib/random-base-bernoulli' ).factory; +```html + + + + + + + ```
@@ -370,7 +386,7 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/ndarray-count-truthy/main/LICENSE -[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/ndarray-ctor +[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/ndarray-ctor/tree/umd diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/benchmark/benchmark.1d.js b/benchmark/benchmark.1d.js deleted file mode 100644 index 4e441ce..0000000 --- a/benchmark/benchmark.1d.js +++ /dev/null @@ -1,137 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2025 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-harness' ); -var isndarrayLike = require( '@stdlib/assert-is-ndarray-like' ); -var pow = require( '@stdlib/math-base-special-pow' ); -var discreteUniform = require( '@stdlib/random-array-discrete-uniform' ); -var shape2strides = require( '@stdlib/ndarray-base-shape2strides' ); -var ndarray = require( '@stdlib/ndarray-ctor' ); -var pkg = require( './../package.json' ).name; -var countTruthy = require( './../lib' ); - - -// VARIABLES // - -var types = [ 'float64' ]; -var orders = [ 'row-major', 'column-major' ]; - - -// FUNCTIONS // - -/** -* Creates a benchmark function. -* -* @private -* @param {PositiveInteger} len - ndarray length -* @param {NonNegativeIntegerArray} shape - ndarray shape -* @param {string} xtype - ndarray data type -* @param {string} order - memory layout -* @param {NonNegativeIntegerArray} dims - list of dimensions to reduce -* @returns {Function} benchmark function -*/ -function createBenchmark( len, shape, xtype, order, dims ) { - var x; - - x = discreteUniform( len, 1, 100 ); - x = new ndarray( xtype, x, shape, shape2strides( shape, order ), 0, order ); - - return benchmark; - - /** - * Benchmark function. - * - * @private - * @param {Benchmark} b - benchmark instance - */ - function benchmark( b ) { - var out; - var i; - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - out = countTruthy( x, { - 'dims': dims - }); - if ( typeof out !== 'object' ) { - b.fail( 'should return an ndarray' ); - } - } - b.toc(); - if ( !isndarrayLike( out ) ) { - b.fail( 'should return an ndarray' ); - } - b.pass( 'benchmark finished' ); - b.end(); - } -} - - -// MAIN // - -/** -* Main execution sequence. -* -* @private -*/ -function main() { - var dims; - var len; - var min; - var max; - var ord; - var sh; - var t1; - var f; - var i; - var j; - var k; - var n; - var d; - - min = 1; // 10^min - max = 6; // 10^max - - d = [ - [ 0 ], - [] - ]; - - for ( n = 0; n < d.length; n++ ) { - dims = d[ n ]; - for ( k = 0; k < orders.length; k++ ) { - ord = orders[ k ]; - for ( j = 0; j < types.length; j++ ) { - t1 = types[ j ]; - for ( i = min; i <= max; i++ ) { - len = pow( 10, i ); - - sh = [ len ]; - f = createBenchmark( len, sh, t1, ord, dims ); - bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+ord+',xtype='+t1+',dims=['+dims.join(',' )+']', f ); - } - } - } - } -} - -main(); diff --git a/benchmark/benchmark.2d.js b/benchmark/benchmark.2d.js deleted file mode 100644 index 10ca405..0000000 --- a/benchmark/benchmark.2d.js +++ /dev/null @@ -1,151 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2025 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-harness' ); -var isndarrayLike = require( '@stdlib/assert-is-ndarray-like' ); -var pow = require( '@stdlib/math-base-special-pow' ); -var sqrt = require( '@stdlib/math-base-special-sqrt' ); -var floor = require( '@stdlib/math-base-special-floor' ); -var discreteUniform = require( '@stdlib/random-array-discrete-uniform' ); -var shape2strides = require( '@stdlib/ndarray-base-shape2strides' ); -var ndarray = require( '@stdlib/ndarray-ctor' ); -var pkg = require( './../package.json' ).name; -var countTruthy = require( './../lib' ); - - -// VARIABLES // - -var types = [ 'float64' ]; -var orders = [ 'row-major', 'column-major' ]; - - -// FUNCTIONS // - -/** -* Creates a benchmark function. -* -* @private -* @param {PositiveInteger} len - ndarray length -* @param {NonNegativeIntegerArray} shape - ndarray shape -* @param {string} xtype - ndarray data type -* @param {string} order - memory layout -* @param {NonNegativeIntegerArray} dims - list of dimensions to reduce -* @returns {Function} benchmark function -*/ -function createBenchmark( len, shape, xtype, order, dims ) { - var x; - - x = discreteUniform( len, 1, 100 ); - x = new ndarray( xtype, x, shape, shape2strides( shape, order ), 0, order ); - - return benchmark; - - /** - * Benchmark function. - * - * @private - * @param {Benchmark} b - benchmark instance - */ - function benchmark( b ) { - var out; - var i; - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - out = countTruthy( x, { - 'dims': dims - }); - if ( typeof out !== 'object' ) { - b.fail( 'should return an ndarray' ); - } - } - b.toc(); - if ( !isndarrayLike( out ) ) { - b.fail( 'should return an ndarray' ); - } - b.pass( 'benchmark finished' ); - b.end(); - } -} - - -// MAIN // - -/** -* Main execution sequence. -* -* @private -*/ -function main() { - var dims; - var len; - var min; - var max; - var ord; - var sh; - var t1; - var f; - var i; - var j; - var k; - var n; - var d; - - min = 1; // 10^min - max = 6; // 10^max - - d = [ - [ 0, 1 ], - [ 0 ], - [ 1 ], - [] - ]; - - for ( n = 0; n < d.length; n++ ) { - dims = d[ n ]; - for ( k = 0; k < orders.length; k++ ) { - ord = orders[ k ]; - for ( j = 0; j < types.length; j++ ) { - t1 = types[ j ]; - for ( i = min; i <= max; i++ ) { - len = pow( 10, i ); - - sh = [ len/2, 2 ]; - f = createBenchmark( len, sh, t1, ord, dims ); - bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+ord+',xtype='+t1+',dims=['+dims.join(',' )+']', f ); - - sh = [ 2, len/2 ]; - f = createBenchmark( len, sh, t1, ord, dims ); - bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+ord+',xtype='+t1+',dims=['+dims.join(',' )+']', f ); - - len = floor( sqrt( len ) ); - sh = [ len, len ]; - len *= len; - f = createBenchmark( len, sh, t1, ord, dims ); - bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+ord+',xtype='+t1+',dims=['+dims.join(',' )+']', f ); - } - } - } - } -} - -main(); diff --git a/branches.md b/branches.md deleted file mode 100644 index 3681c1d..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/count-truthy" -%% click B href "https://github.com/stdlib-js/ndarray-count-truthy/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-count-truthy/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-count-truthy/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-count-truthy/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-count-truthy/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/count-truthy -[production-url]: https://github.com/stdlib-js/ndarray-count-truthy/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-count-truthy/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-count-truthy/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-count-truthy/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-count-truthy/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-count-truthy/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-count-truthy/blob/esm/README.md \ No newline at end of file diff --git a/browser.js b/browser.js new file mode 100644 index 0000000..6c080bd --- /dev/null +++ b/browser.js @@ -0,0 +1,3 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(r="undefined"!=typeof globalThis?globalThis:r||self).countTruthy=t()}(this,(function(){"use strict";var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var t=Object.defineProperty;function e(r){return"number"==typeof r}function n(r){var t,e="";for(t=0;t0&&(t-=1),n=o.toExponential(t)):n=o.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,m,"e"),n=h.call(n,y,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,d,"$1."),n=h.call(n,g,"$1.e")),o>=0&&r.sign&&(n=r.sign+n),n=r.specifier===l.call(r.specifier)?l.call(n):u.call(n)}function b(r){var t,e="";for(t=0;t127)throw new Error("invalid character code. Value: "+n.arg);n.arg=T(a)?String(n.arg):_(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":t||(n.precision=6),n.arg=w(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=o(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,d=n.padRight,g=void 0,(g=p-c.length)<0?c:c=d?c+b(g):b(g)+c)),s+=n.arg||"",u+=1}return s}var R=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function V(r){var t={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(t.precision="1"),t}function O(r){var t,e,n,o;for(e=[],o=0,n=R.exec(r);n;)(t=r.slice(o,R.lastIndex-n[0].length)).length&&e.push(t),e.push(V(n)),o=R.lastIndex,n=R.exec(r);return(t=r.slice(o)).length&&e.push(t),e}function S(r){var t,e;if("string"!=typeof r)throw new TypeError(S("invalid argument. First argument must be a string. Value: `%s`.",r));for(t=[O(r)],e=1;eo&&(n=!1),!n&&!t)return 0;o=i}return n&&t?3:n?1:2}function lr(r,t){return t&&(2===r||3===r)}function hr(r,t){return t&&(1===r||3===r)}function cr(r,t,e){var n,o,i,a,f;for(n=r.length,o=e,i=e,f=0;f0?i+=a*(r[f]-1):a<0&&(o+=a*(r[f]-1))}return[o,i]}function pr(r){return r.re}function dr(r){return r.im}function gr(r){return"string"==typeof r}N(cr,"assign",(function(r,t,e,n){var o,i,a,f,s;for(o=r.length,i=e,a=e,s=0;s0?a+=f*(r[s]-1):f<0&&(i+=f*(r[s]-1))}return n[0]=i,n[1]=a,n}));var yr=String.prototype.valueOf;var mr=Y();function vr(r){return"object"==typeof r&&(r instanceof String||(mr?function(r){try{return yr.call(r),!0}catch(r){return!1}}(r):"[object String]"===$(r)))}function wr(r){return gr(r)||vr(r)}N(wr,"isPrimitive",gr),N(wr,"isObject",vr);var br=/[-\/\\^$*+?.()|[\]{}]/g;var _r=/./,Er=er(),Tr=Er.document&&Er.document.childNodes,xr=Int8Array;function Ar(){return/^\s*function\s*([^(]*)/i}var Rr=/^\s*function\s*([^(]*)/i;N(Ar,"REGEXP",Rr);var Vr=Array.isArray?Array.isArray:function(r){return"[object Array]"===$(r)};function Or(r){return null!==r&&"object"==typeof r}var Sr=function(r){if("function"!=typeof r)throw new TypeError(S("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!Vr(t))return!1;if(e=t.length,0===e)return!1;for(n=0;n=0&&"/"!==r[e];e--);return void 0===e||e<=0?r.replace(br,"\\$&"):(t=(t=r.substring(1,e)).replace(br,"\\$&"),r=r[0]+t+r.substring(e))}(t),"g");else if(!Mr(t))throw new TypeError(S("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",t));if(!gr(e)&&!Pr(e))throw new TypeError(S("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",e));return Fr(r,t,e)}var Cr={int8:"new Int8Array( [ {{data}} ] )",uint8:"new Uint8Array( [ {{data}} ] )",uint8c:"new Uint8ClampedArray( [ {{data}} ] )",int16:"new Int16Array( [ {{data}} ] )",uint16:"new Uint16Array( [ {{data}} ] )",int32:"new Int32Array( [ {{data}} ] )",uint32:"new Uint32Array( [ {{data}} ] )",float32:"new Float32Array( [ {{data}} ] )",float64:"new Float64Array( [ {{data}} ] )",generic:"[ {{data}} ]",binary:"new Buffer( [ {{data}} ] )",complex64:"new Complex64Array( [ {{data}} ] )",complex128:"new Complex128Array( [ {{data}} ] )"};var kr="function"==typeof Uint8Array;var Yr="function"==typeof Uint8Array?Uint8Array:null;var Dr,zr="function"==typeof Uint8Array?Uint8Array:void 0;Dr=function(){var r,t,e;if("function"!=typeof Yr)return!1;try{t=new Yr(t=[1,3.14,-3.14,256,257]),e=t,r=(kr&&e instanceof Uint8Array||"[object Uint8Array]"===$(e))&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?zr:function(){throw new Error("not implemented")};var Wr=Dr,Gr="function"==typeof Uint16Array;var Jr="function"==typeof Uint16Array?Uint16Array:null;var $r,Zr="function"==typeof Uint16Array?Uint16Array:void 0;$r=function(){var r,t,e;if("function"!=typeof Jr)return!1;try{t=new Jr(t=[1,3.14,-3.14,65536,65537]),e=t,r=(Gr&&e instanceof Uint16Array||"[object Uint16Array]"===$(e))&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?Zr:function(){throw new Error("not implemented")};var Kr,qr=$r,Xr={uint16:qr,uint8:Wr};(Kr=new Xr.uint16(1))[0]=4660;var Hr=52===new Xr.uint8(Kr.buffer)[0],Qr="function"==typeof ArrayBuffer;function rt(r){return Qr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===$(r)}var tt="function"==typeof Float64Array;var et="function"==typeof Float64Array?Float64Array:null;var nt,ot="function"==typeof Float64Array?Float64Array:void 0;nt=function(){var r,t,e;if("function"!=typeof et)return!1;try{t=new et([1,3.14,-3.14,NaN]),e=t,r=(tt&&e instanceof Float64Array||"[object Float64Array]"===$(e))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}()?ot:function(){throw new Error("not implemented")};var it=nt,at="function"==typeof ArrayBuffer?ArrayBuffer:null;var ft,st="function"==typeof ArrayBuffer?ArrayBuffer:void 0;ft=function(){var r,t,e;if("function"!=typeof at)return!1;try{(r=rt(e=new at(16))&&"function"==typeof at.isView)&&((t=new it(e))[0]=-3.14,t[1]=NaN,r=r&&at.isView(t)&&16===e.byteLength&&-3.14===t[0]&&t[1]!=t[1])}catch(t){r=!1}return r}()?st:function(){throw new Error("not implemented")};var ut=ft,lt="function"==typeof DataView;var ht="function"==typeof DataView?DataView:null;var ct,pt="function"==typeof DataView?DataView:void 0;ct=function(){var r,t,e,n;if("function"!=typeof ht)return!1;try{e=new ut(24),t=new ht(e,8),n=t,(r=(lt&&n instanceof DataView||"[object DataView]"===$(n))&&"function"==typeof t.getFloat64&&"function"==typeof t.setFloat64)&&(t.setFloat64(0,-3.14),t.setFloat64(8,NaN),r=r&&t.buffer===e&&16===t.byteLength&&8===t.byteOffset&&-3.14===t.getFloat64(0)&&t.getFloat64(8)!=t.getFloat64(8))}catch(t){r=!1}return r}()?pt:function(){throw new Error("not implemented")};var dt=ct,gt="function"==typeof BigInt?BigInt:void 0,yt={all:["binary","bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"]},mt=/_and_generic$/;function vt(){var r,t,e;return 0===arguments.length?yt.all.slice():(e=!1,r=arguments[0],mt.test(r)&&"all"!==(r=Fr(r,mt,""))&&(e=!0),t=(t=yt[r])?t.slice():[],e&&t.length>0&&t.push("generic"),t)}function wt(){return{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256}}function bt(r,t,e){F(r,t,{configurable:!1,enumerable:!0,writable:!1,value:e})}function _t(r){return Object.keys(Object(r))}var Et,Tt=void 0!==Object.keys;function xt(r){return"[object Arguments]"===$(r)}Et=function(){return xt(arguments)}();var At=Et;function Rt(r){return"number"==typeof r}var Vt=Number,Ot=Vt.prototype.toString;var St=Y();function It(r){return"object"==typeof r&&(r instanceof Vt||(St?function(r){try{return Ot.call(r),!0}catch(r){return!1}}(r):"[object Number]"===$(r)))}function jt(r){return Rt(r)||It(r)}function Bt(r){return r!=r}function Pt(r){return Rt(r)&&Bt(r)}function Lt(r){return It(r)&&Bt(r.valueOf())}function Ut(r){return Pt(r)||Lt(r)}N(jt,"isPrimitive",Rt),N(jt,"isObject",It),N(Ut,"isPrimitive",Pt),N(Ut,"isObject",Lt);var Mt=Number.POSITIVE_INFINITY,Ft=Vt.NEGATIVE_INFINITY,Nt=Math.floor;function Ct(r){return Nt(r)===r}function kt(r){return rFt&&Ct(r)}function Yt(r){return Rt(r)&&kt(r)}function Dt(r){return It(r)&&kt(r.valueOf())}function zt(r){return Yt(r)||Dt(r)}N(zt,"isPrimitive",Yt),N(zt,"isObject",Dt);var Wt=Object.prototype.propertyIsEnumerable;var Gt=!Wt.call("beep","0");function Jt(r,t){var e;return null!=r&&(!(e=Wt.call(r,t))&&Gt&&wr(r)?!Pt(t=+t)&&Yt(t)&&t>=0&&t=0&&r.length<=$t&&W(r,"callee")&&!Jt(r,"callee")},Kt=Array.prototype.slice;var qt=Jt((function(){}),"prototype"),Xt=!Jt({toString:null},"toString"),Ht=9007199254740991;function Qt(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Ct(r.length)&&r.length>=0&&r.length<=Ht}function re(r,t,e){var n,o;if(!Qt(r)&&!gr(r))throw new TypeError(S("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(0===(n=r.length))return-1;if(3===arguments.length){if(!Yt(e))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(e>=0){if(e>=n)return-1;o=e}else(o=n+e)<0&&(o=0)}else o=0;if(Ut(t)){for(;o0&&!W(r,"0"))for(f=0;f>>0,o=Nt(r/Ee),Hr?(xe.setUint32(0,i,Hr),xe.setUint32(4,o,Hr)):(xe.setUint32(0,o,Hr),xe.setUint32(4,i,Hr)),a=0;a>>0,n=Nt(r/4294967296),e=new dt(t.buffer),Hr?(e.setUint32(0,o,Hr),e.setUint32(4,n,Hr)):(e.setUint32(0,n,Hr),e.setUint32(4,o,Hr))),t}),"assign",Ae);var Re={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256},Ve=de(),Oe={throw:1,clamp:2,wrap:3,normalize:4};function Se(r,t,e,n,o,i){var a,f,s,u,l;if(!(this instanceof Se))return new Se(r,t,e,n,o,i);for(u=1,l=0;l=0;a--)r-=i=r%e[a],r/=e[a],o+=i*t[a];return this._accessors?this._buffer.get(o):this._buffer[o]})),N(Se.prototype,"set",(function(){var r,t;for(r=this._offset,t=0;t=0;f--)r-=a=r%n[f],r/=n[f],i+=a*e[f];return this._accessors?this._buffer.set(t,i):this._buffer[i]=t,this})),N(Se.prototype,"toString",(function(){var r,t,e,n,o,i;if(t=this._shape.length,e="ndarray( '"+(n=this._dtype)+"', ",r="",this._length<=100)if("complex64"===n||"complex128"===n)for(i=0;i=0;i--)r+=pr(o=this.iget(this._length-1-i))+", "+dr(o),i>0&&(r+=", ");else for(i=2;i>=0;i--)r+=this.iget(this._length-1-i),i>0&&(r+=", ")}if(e+=Nr(Cr[this.dtype],"{{data}}",r),e+=", ",e+=0===t?"[]":"[ "+this._shape.join(", ")+" ]",e+=", ",e+="[ ",0===t)e+="0";else for(i=0;i=0;o--)e[o]=n,n*=r[o];return e}(r)}N(Ge,"assign",(function(r,t,e){return"column-major"===t?function(r,t){var e,n;for(e=1,n=0;n=0;n--)t[n]=e,e*=r[n];return t}(r,e)}));var Je="row-major";function $e(r,t){var e,n,o;return"object"!=typeof(o=r.strides)||null===o?0===(n=r.shape).length?[0]:("string"!=typeof(e=r.order)&&(e=Je),Ge(n,e)):t?ze(o):o}function Ze(r,t){var e,n,o;for(n=r.length,e=0,o=0;ot?-1:r}function en(r,t){var e,n,o,i;for(e={},n=[],i=0;i=0}function Nn(r){return Dt(r)&&r.valueOf()>=0}function Cn(r){return Fn(r)||Nn(r)}N(Cn,"isPrimitive",Fn),N(Cn,"isObject",Nn);var kn=4294967295;function Yn(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Ct(r.length)&&r.length>=0&&r.length<=kn}function Dn(r){return"object"==typeof r&&null!==r&&!Vr(r)}function zn(r,t){if(!(this instanceof zn))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Rt(r))throw new TypeError(S("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Rt(t))throw new TypeError(S("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return F(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),F(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}N(zn,"BYTES_PER_ELEMENT",8),N(zn.prototype,"BYTES_PER_ELEMENT",8),N(zn.prototype,"byteLength",16),N(zn.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(zn.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var Wn="function"==typeof Math.fround?Math.fround:null,Gn=new hn(1);var Jn="function"==typeof Wn?Wn:function(r){return Gn[0]=r,Gn[0]};function $n(r,t){if(!(this instanceof $n))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Rt(r))throw new TypeError(S("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Rt(t))throw new TypeError(S("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return F(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Jn(r)}),F(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Jn(t)}),this}function Zn(r){return r instanceof zn||r instanceof $n||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function Kn(r){return Ct(r/2)}N($n,"BYTES_PER_ELEMENT",4),N($n.prototype,"BYTES_PER_ELEMENT",4),N($n.prototype,"byteLength",8),N($n.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N($n.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var qn=8;function Xn(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===qn}var Hn=16;function Qn(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Hn}function ro(){return"function"==typeof G&&"symbol"==typeof G("foo")&&W(G,"iterator")&&"symbol"==typeof G.iterator}var to=ro()?Symbol.iterator:null;function eo(r,t){if(!(this instanceof eo))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Rt(r))throw new TypeError(S("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Rt(t))throw new TypeError(S("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return F(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Jn(r)}),F(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Jn(t)}),this}function no(r){return r.re}function oo(r){return r.im}function io(r,t){return new hn(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function ao(r,t){return new it(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function fo(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(Yn(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!Zn(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(no(n),oo(n))}return t}N(eo,"BYTES_PER_ELEMENT",4),N(eo.prototype,"BYTES_PER_ELEMENT",4),N(eo.prototype,"byteLength",8),N(eo.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(eo.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var so=2*hn.BYTES_PER_ELEMENT,uo=ro();function lo(r){return r instanceof po||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ho(r){return r===po||"Complex128Array"===r.name}function co(r,t){return new eo(r[t*=2],r[t+1])}function po(){var r,t,e,n;if(t=arguments.length,!(this instanceof po))return 0===t?new po:1===t?new po(arguments[0]):2===t?new po(arguments[0],arguments[1]):new po(arguments[0],arguments[1],arguments[2]);if(0===t)e=new hn(0);else if(1===t)if(Fn(arguments[0]))e=new hn(2*arguments[0]);else if(Qt(arguments[0]))if((n=(e=arguments[0]).length)&&Vr(e)&&Zn(e[0])){if(e=function(r,t){var e,n,o,i;for(e=t.length,i=0,o=0;oe.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*so));e=new hn(e,r,2*n)}}return N(this,"_buffer",e),N(this,"_length",e.length/2),this}function go(r,t){if(!(this instanceof go))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Rt(r))throw new TypeError(S("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Rt(t))throw new TypeError(S("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return F(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),F(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}function yo(r){return r.re}function mo(r){return r.im}function vo(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(Yn(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!Zn(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(yo(n),mo(n))}return t}N(po,"BYTES_PER_ELEMENT",so),N(po,"name","Complex64Array"),N(po,"from",(function(r){var t,e,n,o,i,a,f,s,u,l,h,c;if(!Pr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ho(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!Pr(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(lo(r)){if(s=r.length,n){for(i=(o=new this(s))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));i[c]=l[0],i[c+1]=l[1]}c+=2}return o}return new this(r)}if(Qt(r)){if(n){for(s=r.length,f=r.get&&r.set?Le("default"):Ne("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));i[c]=l[0],i[c+1]=l[1]}c+=2}return o}return new this(r)}if(Dn(r)&&uo&&Pr(r[to])){if(!Pr((i=r[to]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,o,i,a;for(n=[],a=-1;!(o=r.next()).done;)if(a+=1,Yn(i=t.call(e,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!Zn(i))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));n.push(no(i),oo(i))}return n}(i,n,t):fo(i),a instanceof Error)throw a;for(i=(o=new this(s=a.length/2))._buffer,h=0;h=this._length))return co(this._buffer,r)})),or(po.prototype,"buffer",(function(){return this._buffer.buffer})),or(po.prototype,"byteLength",(function(){return this._buffer.byteLength})),or(po.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(po.prototype,"BYTES_PER_ELEMENT",po.BYTES_PER_ELEMENT),N(po.prototype,"copyWithin",(function(r,t){if(!lo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),N(po.prototype,"entries",(function(){var r,t,e,n,o,i,a;if(!lo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,i=-1,a=-2,N(e={},"next",(function(){var t;if(i+=1,o||i>=n)return{done:!0};return t=new eo(r[a+=2],r[a+1]),{value:[i,t],done:!1}})),N(e,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),to&&N(e,to,(function(){return t.entries()})),e})),N(po.prototype,"every",(function(r,t){var e,n;if(!lo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n1){if(!Ct(t))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=o)<0&&(t=0),arguments.length>2){if(!Ct(e))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=o)<0&&(e=0),e>o&&(e=o)}else e=o}else t=0,e=o;for(a=no(r),f=oo(r),s=t;s=0;n--)if(o=co(e,n),r.call(t,o,n,this))return o})),N(po.prototype,"findLastIndex",(function(r,t){var e,n,o;if(!lo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(o=co(e,n),r.call(t,o,n,this))return n;return-1})),N(po.prototype,"forEach",(function(r,t){var e,n,o;if(!lo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n=this._length))return co(this._buffer,r)})),N(po.prototype,"includes",(function(r,t){var e,n,o,i,a;if(!lo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Zn(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Ct(t))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=no(r),i=oo(r),e=this._buffer,a=t;a1){if(!Ct(t))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=no(r),i=oo(r),e=this._buffer,a=t;a1){if(!Ct(t))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(o=no(r),i=oo(r),e=this._buffer,a=t;a>=0;a--)if(o===e[n=2*a]&&i===e[n+1])return a;return-1})),or(po.prototype,"length",(function(){return this._length})),N(po.prototype,"map",(function(r,t){var e,n,o,i,a;if(!lo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(o=new this.constructor(this._length))._buffer,i=0;i1)n=t,i=0;else{if(0===o)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=co(e,0),i=1}for(;i1){if(!Fn(e=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Zn(r)){if(e>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=no(r),void(n[e+1]=oo(r))}if(lo(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,u=n.byteOffset+e*so,t.buffer===n.buffer&&t.byteOffsetu){for(o=new hn(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,u=n.byteOffset+e*so,t.buffer===n.buffer&&t.byteOffsetu){for(o=new hn(a),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,s=0;sf&&(t=f)}}for(e=ro&&(t=o)}}return r>=o?(o=0,e=n.byteLength):r>=t?(o=0,e=n.byteOffset+r*so):(o=t-r,e=n.byteOffset+r*so),new this.constructor(n.buffer,e,o<0?0:o)})),N(po.prototype,"toReversed",(function(){var r,t,e,n,o,i;if(!lo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,o=0;o=o)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Zn(t))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=no(t),e[2*r+1]=oo(t),n})),N(go,"BYTES_PER_ELEMENT",8),N(go.prototype,"BYTES_PER_ELEMENT",8),N(go.prototype,"byteLength",16),N(go.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(go.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var wo=2*it.BYTES_PER_ELEMENT,bo=ro();function _o(r){return r instanceof xo||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Eo(r){return r===xo||"Complex64Array"===r.name}function To(r,t){return new go(r[t*=2],r[t+1])}function xo(){var r,t,e,n;if(t=arguments.length,!(this instanceof xo))return 0===t?new xo:1===t?new xo(arguments[0]):2===t?new xo(arguments[0],arguments[1]):new xo(arguments[0],arguments[1],arguments[2]);if(0===t)e=new it(0);else if(1===t)if(Fn(arguments[0]))e=new it(2*arguments[0]);else if(Qt(arguments[0]))if((n=(e=arguments[0]).length)&&Vr(e)&&Zn(e[0])){if(e=function(r,t){var e,n,o,i;for(e=t.length,i=0,o=0;oe.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*wo));e=new it(e,r,2*n)}}return N(this,"_buffer",e),N(this,"_length",e.length/2),this}N(xo,"BYTES_PER_ELEMENT",wo),N(xo,"name","Complex128Array"),N(xo,"from",(function(r){var t,e,n,o,i,a,f,s,u,l,h,c;if(!Pr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Eo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!Pr(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(_o(r)){if(s=r.length,n){for(i=(o=new this(s))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));i[c]=l[0],i[c+1]=l[1]}c+=2}return o}return new this(r)}if(Qt(r)){if(n){for(s=r.length,f=r.get&&r.set?Le("default"):Ne("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));i[c]=l[0],i[c+1]=l[1]}c+=2}return o}return new this(r)}if(Dn(r)&&bo&&Pr(r[to])){if(!Pr((i=r[to]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,o,i,a;for(n=[],a=-1;!(o=r.next()).done;)if(a+=1,Yn(i=t.call(e,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!Zn(i))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));n.push(yo(i),mo(i))}return n}(i,n,t):vo(i),a instanceof Error)throw a;for(i=(o=new this(s=a.length/2))._buffer,h=0;h=this._length))return To(this._buffer,r)})),or(xo.prototype,"buffer",(function(){return this._buffer.buffer})),or(xo.prototype,"byteLength",(function(){return this._buffer.byteLength})),or(xo.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(xo.prototype,"BYTES_PER_ELEMENT",xo.BYTES_PER_ELEMENT),N(xo.prototype,"copyWithin",(function(r,t){if(!_o(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),N(xo.prototype,"entries",(function(){var r,t,e,n,o,i,a;if(!_o(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,i=-1,a=-2,N(e={},"next",(function(){var t;if(i+=1,o||i>=n)return{done:!0};return t=new go(r[a+=2],r[a+1]),{value:[i,t],done:!1}})),N(e,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),to&&N(e,to,(function(){return t.entries()})),e})),N(xo.prototype,"every",(function(r,t){var e,n;if(!_o(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n1){if(!Ct(t))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=o)<0&&(t=0),arguments.length>2){if(!Ct(e))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=o)<0&&(e=0),e>o&&(e=o)}else e=o}else t=0,e=o;for(a=yo(r),f=mo(r),s=t;s=0;n--)if(o=To(e,n),r.call(t,o,n,this))return o})),N(xo.prototype,"findLastIndex",(function(r,t){var e,n,o;if(!_o(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(o=To(e,n),r.call(t,o,n,this))return n;return-1})),N(xo.prototype,"forEach",(function(r,t){var e,n,o;if(!_o(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n=this._length))return To(this._buffer,r)})),or(xo.prototype,"length",(function(){return this._length})),N(xo.prototype,"includes",(function(r,t){var e,n,o,i,a;if(!_o(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Zn(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Ct(t))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=yo(r),i=mo(r),e=this._buffer,a=t;a1){if(!Ct(t))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=yo(r),i=mo(r),e=this._buffer,a=t;a1){if(!Ct(t))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(o=yo(r),i=mo(r),e=this._buffer,a=t;a>=0;a--)if(o===e[n=2*a]&&i===e[n+1])return a;return-1})),N(xo.prototype,"map",(function(r,t){var e,n,o,i,a;if(!_o(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(o=new this.constructor(this._length))._buffer,i=0;i1)n=t,i=0;else{if(0===o)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=To(e,0),i=1}for(;i1){if(!Fn(e=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Zn(r)){if(e>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=yo(r),void(n[e+1]=mo(r))}if(_o(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,u=n.byteOffset+e*wo,t.buffer===n.buffer&&t.byteOffsetu){for(o=new it(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,u=n.byteOffset+e*wo,t.buffer===n.buffer&&t.byteOffsetu){for(o=new it(a),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,s=0;sf&&(t=f)}}for(e=ro&&(t=o)}}return r>=o?(o=0,e=n.byteLength):r>=t?(o=0,e=n.byteOffset+r*wo):(o=t-r,e=n.byteOffset+r*wo),new this.constructor(n.buffer,e,o<0?0:o)})),N(xo.prototype,"toReversed",(function(){var r,t,e,n,o,i;if(!_o(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,o=0;o=o)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Zn(t))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=yo(t),e[2*r+1]=mo(t),n}));var Ao=[it,hn,_n,yn,Rn,qr,Mn,Wr,jn,po,xo],Ro=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128"],Vo=Ro.length;function Oo(r){var t;if(Vr(r))return"generic";if(Ir(r))return null;for(t=0;t=0&&a=0&&!(((u=r[i])<0?-u:u)<=e);)r[i+1]=u,t[a+1]=t[a],i-=1,a-=1;r[i+1]=f,t[a+1]=s,n+=1,o+=1}}(t=ze(t),n),{sh:r=Lo(r,n),sx:t,sy:e=Lo(e,n)}}N(Bo,"assign",(function(r,t,e){var n=So(r);return n.accessorProtocol?"complex128"===n.dtype?Po(r,ao(r,0),t,e):"complex64"===n.dtype?Po(r,io(r,0),t,e):function(r,t,e){var n,o,i,a;for(n=r.data,o=r.accessors[1],a=e,i=0;a>=0&&a=0&&on?Mo.BLOCK_SIZE_IN_BYTES/e|0:Mo.BLOCK_SIZE_IN_BYTES/n|0}function No(r,t){var e,n;for(e=[],n=0;n1?arguments[1]:$o))return Co(r);if(e=function(r){return zo[r]||null}(t),null===e)throw new TypeError(S("invalid argument. Second argument must be a recognized data type. Value: `%s`.",t));return new e(r)}var Ko={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128",BooleanArray:"bool"};function qo(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(Z(e.value));return t}var Xo=Wr.BYTES_PER_ELEMENT,Ho=ro();function Qo(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===Xo}function ri(r){return r===ti}function ti(){var r,t,e,n,o;if(t=arguments.length,!(this instanceof ti))return 0===t?new ti:1===t?new ti(arguments[0]):2===t?new ti(arguments[0],arguments[1]):new ti(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Wr(0);else if(1===t)if(Fn(o=arguments[0]))e=new Wr(o);else if(Qt(o))e=function(r,t){var e,n;for(e=t.length,n=0;ne.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Xo));e=new Wr(e,r,n)}}return N(this,"_buffer",e),N(this,"_length",e.length),this}N(ti,"BYTES_PER_ELEMENT",Xo),N(ti,"name","BooleanArray"),N(ti,"from",(function(r){var t,e,n,o,i,a,f,s,u;if(!Pr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ri(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!Pr(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Qt(r)){if(n){for(s=r.length,f=r.get&&r.set?Le("default"):Ne("default"),i=(o=new this(s))._buffer,u=0;u=0;o--)if(n=Z(e[o]),r.call(t,n,o,this))return n})),N(ti.prototype,"findLastIndex",(function(r,t){var e,n,o;if(!Qo(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,o=this._length-1;o>=0;o--)if(n=Z(e[o]),r.call(t,n,o,this))return o;return-1})),N(ti.prototype,"get",(function(r){if(!Qo(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Fn(r))throw new TypeError(S("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Z(this._buffer[r])})),or(ti.prototype,"length",(function(){return this._length})),N(ti.prototype,"map",(function(r,t){var e,n,o,i;if(!Qo(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Pr(r))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",r);for(o=this._buffer,e=(n=new this.constructor(this._length))._buffer,i=0;i1){if(!Fn(e=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Qt(r)){if(e+(i=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=Qo(r)?r._buffer:r,f=n.byteOffset+e*Xo,t.buffer===n.buffer&&t.byteOffsetf){for(o=new Wr(t.length),a=0;a=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),N(ti.prototype,"sort",(function(r){var t;if(!Qo(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!Pr(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Z(t),Z(e))})),this})),N(ti.prototype,"toReversed",(function(){var r,t,e,n,o;if(!Qo(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,o=0;o0&&t.push("generic"),t)}var ui=ii(si("complex_floating_point")),li=ii(si("boolean"));function hi(r,t){if(Qn(r))return ao(r,t);if(Xn(r))return io(r,t);throw new TypeError(S("invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.",r))}function ci(r,t){return new Wr(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,r.length-t)}function pi(r,t,e,n,o){var i,a;for(i=o,a=0;a=f&&(o=f-1);else if("wrap"===i)o<0?(o+=f)<0&&0!==(o%=f)&&(o+=f):o>=f&&(o-=f)>=f&&(o%=f);else if("normalize"===i&&o<0&&(o+=f),o<0||o>=f)throw new RangeError(S("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",f,o));if(s=e,"column-major"===n){for(l=0;l=0;l--)o-=u=o%r[l],o/=r[l],s+=u*t[l];return s}N(gi,"assign",di);var mi="throw";var vi="throw";var wi=[function(r,t,e){t[1].data[t[1].offset]=r(gi(t,1),e)},function(r,t,e,n,o){var i,a,f,s,u,l,h;for(f=(l=t[1]).shape[0],a=[n[0]],h=1;h0;){for(w0;){for(v0;){for(x0;){for(T0;){for(E0;){for(S0;){for(O0;){for(V0;){for(R0;){for(L0;){for(P0;){for(B0;){for(j0;){for(I0;){for(C0;){for(N0;){for(F0;){for(M0;){for(U0;){for(L0;){for(W0;){for(z0;){for(D0;){for(Y0;){for(k0;){for(C0;){for(N0;){for(K0;){for(Z0;){for($0;){for(J0;){for(G0;){for(W0;){for(z0;){for(D0;){for(rr0;){for(Q0;){for(H0;){for(X0;){for(q0;){for(K0;){for(Z0;){for($0;){for(J0;){for(ir0;){for(or0;){for(nr0;){for(er0;){for(tr0;){for(rr0;){for(Q0;){for(H0;){for(X0;){for(q0;){for(b0;){for(w0;){for(A0;){for(x0;){for(T0;){for(I0;){for(S0;){for(O0;){for(V0;){for(U0;){for(L0;){for(P0;){for(B0;){for(j0;){for(k0;){for(C0;){for(N0;){for(F0;){for(M0;){for(U0;){for(G0;){for(W0;){for(z0;){for(D0;){for(Y0;){for(k0;){for(C0;){for(q0;){for(K0;){for(Z0;){for($0;){for(J0;){for(G0;){for(W0;){for(z0;){for(tr0;){for(rr0;){for(Q0;){for(H0;){for(X0;){for(q0;){for(K0;){for(Z0;){for($0;){for(ar0;){for(ir0;){for(or0;){for(nr0;){for(er0;){for(tr0;){for(rr0;){for(Q0;){for(H0;){for(X3?n:{},T=t.length,s=[],O=0;Oi)throw new RangeError(S("invalid argument. Number of specified dimensions cannot exceed the number of dimensions in the input array. Number of dimensions: %d. Value: [%s].",i,jo(e,",")));for(A=i-x,O=1;O2?n:{};return xi(r,t,e,o)}}));var Ai=8,Ri=16;var Vi=1;var Oi=5;function Si(r,t,e,n){var o,i;if(r<=0||n<=0||1===t)return e;if(1===n){if((o=r%Oi)>0)for(i=0;i=0&&!(((u=r[i])<0?-u:u)<=e);)r[i+1]=u,t[a+1]=t[a],i-=1,a-=1;r[i+1]=f,t[a+1]=s,n+=1,o+=1}}(t=ze(t),e),{sh:r=Lo(r,e),sx:t,idx:e}}N(Si,"ndarray",(function(r,t,e,n,o){var i,a,f;if(r<=0||1===t)return e;if(i=o,1===n){if((a=r%5)>0)for(f=0;f0;)for(y0;)for(g0;)for(_0;)for(b0;)for(w0;)for(R0;)for(A0;)for(x0;)for(T0;)for(j0;)for(I0;)for(S0;)for(O0;)for(V0;)for(M0;)for(U0;)for(L0;)for(P0;)for(B0;)for(j0;)for(Y0;)for(k0;)for(C0;)for(N0;)for(F0;)for(M0;)for(U0;)for(J0;)for(G0;)for(W0;)for(z0;)for(D0;)for(Y0;)for(k0;)for(C0;)for(X0;)for(q0;)for(K0;)for(Z0;)for($0;)for(J0;)for(G0;)for(W0;)for(z0;)for(er0;)for(tr0;)for(rr0;)for(Q0;)for(H0;)for(X0;)for(q0;)for(K0;)for(Z0;)for($0;)for(m0;)for(y0;)for(E0;)for(_0;)for(b0;)for(V0;)for(R0;)for(A0;)for(x0;)for(B0;)for(j0;)for(I0;)for(S0;)for(O0;)for(F0;)for(M0;)for(U0;)for(L0;)for(P0;)for(B0;)for(D0;)for(Y0;)for(k0;)for(C0;)for(N0;)for(F0;)for(M0;)for($0;)for(J0;)for(G0;)for(W0;)for(z0;)for(D0;)for(Y0;)for(k0;)for(H0;)for(X0;)for(q0;)for(K0;)for(Z0;)for($0;)for(J0;)for(G0;)for(W0;)for(nr0;)for(er0;)for(tr0;)for(rr0;)for(Q0;)for(H0;)for(X0;)for(q0;)for(K0;)for(Z0;)for(y0;)for(g0;)for(_0;)for(b0;)for(w0;)for(R0;)for(A0;)for(x0;)for(T0;)for(j0;)for(I0;)for(S0;)for(O0;)for(V0;)for(M0;)for(U0;)for(L0;)for(P0;)for(B0;)for(j0;)for(Y0;)for(k0;)for(C0;)for(N0;)for(F0;)for(M0;)for(U0;)for(J0;)for(G0;)for(W0;)for(z0;)for(D0;)for(Y0;)for(k0;)for(C0;)for(X0;)for(q0;)for(K0;)for(Z0;)for($0;)for(J0;)for(G0;)for(W0;)for(z0;)for(er0;)for(tr0;)for(rr0;)for(Q0;)for(H0;)for(X0;)for(q0;)for(K0;)for(Z0;)for($(i=e(r,a)))return!1;o=i}return!0}function ia(r,t,e){var n,o,i,a,f,s,u,l,h,c,p;if(f=We(t,!1),s=$e(t,!1),a=He(t),i="row-major"===a,f.length>r)throw new RangeError(S("invalid argument. First argument must be greater than or equal to the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `%d`.",f.length,r));if(null===(u=en(e,r-1)))throw new RangeError(S("invalid argument. Specified dimension index is out-of-bounds. Must be on the interval: [-%u, %u]. Value: `[%s]`.",r,r-1,e.join(", ")));if(u.length!==e.length)throw new Error(S("invalid argument. Must provide unique dimension indices. Value: `[%s]`.",e.join(", ")));if(u.length!==f.length)throw new RangeError(S("invalid argument. Must provide the same number of dimension indices as the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `[%s]`.",f.length,e.join(", ")));if(u.length&&!oa(u))throw new Error(S("invalid argument. Must provide dimension indices which resolve to nonnegative indices arranged in ascending order. Value: `[%s]`.",e.join(", ")));if(0===f.length)o=function(r){return No(1,r)}(r),n=Co(r);else for(n=[],o=[],p=0,c=0;c=0&&r.length<=kn}function ca(r){if(r.__esModule)return r;var t=r.default;if("function"==typeof t){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach((function(t){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})})),e}var pa="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},da=[],ga=[],ya="undefined"!=typeof Uint8Array?Uint8Array:Array,ma=!1;function va(){ma=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)da[t]=r[t],ga[r.charCodeAt(t)]=t;ga["-".charCodeAt(0)]=62,ga["_".charCodeAt(0)]=63}function wa(r,t,e){for(var n,o,i=[],a=t;a>18&63]+da[o>>12&63]+da[o>>6&63]+da[63&o]);return i.join("")}function ba(r){var t;ma||va();for(var e=r.length,n=e%3,o="",i=[],a=16383,f=0,s=e-n;fs?s:f+a));return 1===n?(t=r[e-1],o+=da[t>>2],o+=da[t<<4&63],o+="=="):2===n&&(t=(r[e-2]<<8)+r[e-1],o+=da[t>>10],o+=da[t>>4&63],o+=da[t<<2&63],o+="="),i.push(o),i.join("")}function _a(r,t,e,n,o){var i,a,f=8*o-n-1,s=(1<>1,l=-7,h=e?o-1:0,c=e?-1:1,p=r[t+h];for(h+=c,i=p&(1<<-l)-1,p>>=-l,l+=f;l>0;i=256*i+r[t+h],h+=c,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+r[t+h],h+=c,l-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=u}return(p?-1:1)*a*Math.pow(2,i-n)}function Ea(r,t,e,n,o,i){var a,f,s,u=8*i-o-1,l=(1<>1,c=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(f=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+h>=1?c/s:c*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=l?(f=0,a=l):a+h>=1?(f=(t*s-1)*Math.pow(2,o),a+=h):(f=t*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;r[e+p]=255&f,p+=d,f/=256,o-=8);for(a=a<0;r[e+p]=255&a,p+=d,a/=256,u-=8);r[e+p-d]|=128*g}var Ta={}.toString,xa=Array.isArray||function(r){return"[object Array]"==Ta.call(r)};Oa.TYPED_ARRAY_SUPPORT=void 0===pa.TYPED_ARRAY_SUPPORT||pa.TYPED_ARRAY_SUPPORT;var Aa=Ra();function Ra(){return Oa.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Va(r,t){if(Ra()=Ra())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ra().toString(16)+" bytes");return 0|r}function La(r){return!(null==r||!r._isBuffer)}function Ua(r,t){if(La(r))return r.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;"string"!=typeof r&&(r=""+r);var e=r.length;if(0===e)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return uf(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return lf(r).length;default:if(n)return uf(r).length;t=(""+t).toLowerCase(),n=!0}}function Ma(r,t,e){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(t>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return Xa(this,t,e);case"utf8":case"utf-8":return $a(this,t,e);case"ascii":return Ka(this,t,e);case"latin1":case"binary":return qa(this,t,e);case"base64":return Ja(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ha(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function Fa(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Na(r,t,e,n,o){if(0===r.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(o)return-1;e=r.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof t&&(t=Oa.from(t,n)),La(t))return 0===t.length?-1:Ca(r,t,e,n,o);if("number"==typeof t)return t&=255,Oa.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Ca(r,[t],e,n,o);throw new TypeError("val must be string, number or Buffer")}function Ca(r,t,e,n,o){var i,a=1,f=r.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(r.length<2||t.length<2)return-1;a=2,f/=2,s/=2,e/=2}function u(r,t){return 1===a?r[t]:r.readUInt16BE(t*a)}if(o){var l=-1;for(i=e;if&&(e=f-s),i=e;i>=0;i--){for(var h=!0,c=0;co&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=e%256,i.push(o),i.push(n);return i}(t,r.length-e),r,e,n)}function Ja(r,t,e){return 0===t&&e===r.length?ba(r):ba(r.slice(t,e))}function $a(r,t,e){e=Math.min(r.length,e);for(var n=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+h<=e)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(i=r[o+1]))&&(s=(31&u)<<6|63&i)>127&&(l=s);break;case 3:i=r[o+1],a=r[o+2],128==(192&i)&&128==(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:i=r[o+1],a=r[o+2],f=r[o+3],128==(192&i)&&128==(192&a)&&128==(192&f)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&f)>65535&&s<1114112&&(l=s)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=h}return function(r){var t=r.length;if(t<=Za)return String.fromCharCode.apply(String,r);var e="",n=0;for(;n0&&(r=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(r+=" ... ")),""},Oa.prototype.compare=function(r,t,e,n,o){if(!La(r))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===e&&(e=r?r.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||e>r.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=e)return 0;if(n>=o)return-1;if(t>=e)return 1;if(this===r)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(e>>>=0)-(t>>>=0),f=Math.min(i,a),s=this.slice(n,o),u=r.slice(t,e),l=0;lo)&&(e=o),r.length>0&&(e<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return ka(this,r,t,e);case"utf8":case"utf-8":return Ya(this,r,t,e);case"ascii":return Da(this,r,t,e);case"latin1":case"binary":return za(this,r,t,e);case"base64":return Wa(this,r,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ga(this,r,t,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Oa.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Za=4096;function Ka(r,t,e){var n="";e=Math.min(r.length,e);for(var o=t;on)&&(e=n);for(var o="",i=t;ie)throw new RangeError("Trying to access beyond buffer length")}function rf(r,t,e,n,o,i){if(!La(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||tr.length)throw new RangeError("Index out of range")}function tf(r,t,e,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(r.length-e,2);o>>8*(n?o:1-o)}function ef(r,t,e,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(r.length-e,4);o>>8*(n?o:3-o)&255}function nf(r,t,e,n,o,i){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function of(r,t,e,n,o){return o||nf(r,0,e,4),Ea(r,t,e,n,23,4),e+4}function af(r,t,e,n,o){return o||nf(r,0,e,8),Ea(r,t,e,n,52,8),e+8}Oa.prototype.slice=function(r,t){var e,n=this.length;if((r=~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[r+--t]*o;return n},Oa.prototype.readUInt8=function(r,t){return t||Qa(r,1,this.length),this[r]},Oa.prototype.readUInt16LE=function(r,t){return t||Qa(r,2,this.length),this[r]|this[r+1]<<8},Oa.prototype.readUInt16BE=function(r,t){return t||Qa(r,2,this.length),this[r]<<8|this[r+1]},Oa.prototype.readUInt32LE=function(r,t){return t||Qa(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},Oa.prototype.readUInt32BE=function(r,t){return t||Qa(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},Oa.prototype.readIntLE=function(r,t,e){r|=0,t|=0,e||Qa(r,t,this.length);for(var n=this[r],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},Oa.prototype.readIntBE=function(r,t,e){r|=0,t|=0,e||Qa(r,t,this.length);for(var n=t,o=1,i=this[r+--n];n>0&&(o*=256);)i+=this[r+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Oa.prototype.readInt8=function(r,t){return t||Qa(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},Oa.prototype.readInt16LE=function(r,t){t||Qa(r,2,this.length);var e=this[r]|this[r+1]<<8;return 32768&e?4294901760|e:e},Oa.prototype.readInt16BE=function(r,t){t||Qa(r,2,this.length);var e=this[r+1]|this[r]<<8;return 32768&e?4294901760|e:e},Oa.prototype.readInt32LE=function(r,t){return t||Qa(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},Oa.prototype.readInt32BE=function(r,t){return t||Qa(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},Oa.prototype.readFloatLE=function(r,t){return t||Qa(r,4,this.length),_a(this,r,!0,23,4)},Oa.prototype.readFloatBE=function(r,t){return t||Qa(r,4,this.length),_a(this,r,!1,23,4)},Oa.prototype.readDoubleLE=function(r,t){return t||Qa(r,8,this.length),_a(this,r,!0,52,8)},Oa.prototype.readDoubleBE=function(r,t){return t||Qa(r,8,this.length),_a(this,r,!1,52,8)},Oa.prototype.writeUIntLE=function(r,t,e,n){(r=+r,t|=0,e|=0,n)||rf(this,r,t,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[t]=255&r;++i=0&&(i*=256);)this[t+o]=r/i&255;return t+e},Oa.prototype.writeUInt8=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,1,255,0),Oa.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[t]=255&r,t+1},Oa.prototype.writeUInt16LE=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,2,65535,0),Oa.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8):tf(this,r,t,!0),t+2},Oa.prototype.writeUInt16BE=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,2,65535,0),Oa.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=255&r):tf(this,r,t,!1),t+2},Oa.prototype.writeUInt32LE=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,4,4294967295,0),Oa.TYPED_ARRAY_SUPPORT?(this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=255&r):ef(this,r,t,!0),t+4},Oa.prototype.writeUInt32BE=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,4,4294967295,0),Oa.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r):ef(this,r,t,!1),t+4},Oa.prototype.writeIntLE=function(r,t,e,n){if(r=+r,t|=0,!n){var o=Math.pow(2,8*e-1);rf(this,r,t,e,o-1,-o)}var i=0,a=1,f=0;for(this[t]=255&r;++i>0)-f&255;return t+e},Oa.prototype.writeIntBE=function(r,t,e,n){if(r=+r,t|=0,!n){var o=Math.pow(2,8*e-1);rf(this,r,t,e,o-1,-o)}var i=e-1,a=1,f=0;for(this[t+i]=255&r;--i>=0&&(a*=256);)r<0&&0===f&&0!==this[t+i+1]&&(f=1),this[t+i]=(r/a>>0)-f&255;return t+e},Oa.prototype.writeInt8=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,1,127,-128),Oa.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[t]=255&r,t+1},Oa.prototype.writeInt16LE=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,2,32767,-32768),Oa.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8):tf(this,r,t,!0),t+2},Oa.prototype.writeInt16BE=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,2,32767,-32768),Oa.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=255&r):tf(this,r,t,!1),t+2},Oa.prototype.writeInt32LE=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,4,2147483647,-2147483648),Oa.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24):ef(this,r,t,!0),t+4},Oa.prototype.writeInt32BE=function(r,t,e){return r=+r,t|=0,e||rf(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),Oa.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r):ef(this,r,t,!1),t+4},Oa.prototype.writeFloatLE=function(r,t,e){return of(this,r,t,!0,e)},Oa.prototype.writeFloatBE=function(r,t,e){return of(this,r,t,!1,e)},Oa.prototype.writeDoubleLE=function(r,t,e){return af(this,r,t,!0,e)},Oa.prototype.writeDoubleBE=function(r,t,e){return af(this,r,t,!1,e)},Oa.prototype.copy=function(r,t,e,n){if(e||(e=0),n||0===n||(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t=0;--o)r[o+t]=this[o+e];else if(i<1e3||!Oa.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,e=void 0===e?this.length:e>>>0,r||(r=0),"number"==typeof r)for(i=t;i55295&&e<57344){if(!o){if(e>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(t-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((t-=1)<0)break;i.push(e)}else if(e<2048){if((t-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((t-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function lf(r){return function(r){var t,e,n,o,i,a;ma||va();var f=r.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===r[f-2]?2:"="===r[f-1]?1:0,a=new ya(3*f/4-i),n=i>0?f-4:f;var s=0;for(t=0,e=0;t>16&255,a[s++]=o>>8&255,a[s++]=255&o;return 2===i?(o=ga[r.charCodeAt(t)]<<2|ga[r.charCodeAt(t+1)]>>4,a[s++]=255&o):1===i&&(o=ga[r.charCodeAt(t)]<<10|ga[r.charCodeAt(t+1)]<<4|ga[r.charCodeAt(t+2)]>>2,a[s++]=o>>8&255,a[s++]=255&o),a}(function(r){if((r=function(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}(r).replace(ff,"")).length<2)return"";for(;r.length%4!=0;)r+="=";return r}(r))}function hf(r,t,e,n){for(var o=0;o=t.length||o>=r.length);++o)t[o+e]=r[o];return o}function cf(r){return null!=r&&(!!r._isBuffer||pf(r)||function(r){return"function"==typeof r.readFloatLE&&"function"==typeof r.slice&&pf(r.slice(0,0))}(r))}function pf(r){return!!r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)}ca(Object.freeze({__proto__:null,Buffer:Oa,INSPECT_MAX_BYTES:50,SlowBuffer:function(r){return+r!=r&&(r=0),Oa.alloc(+r)},isBuffer:cf,kMaxLength:Aa})).Buffer;var df=function(){throw new Error("not implemented")};var gf=Pr(df.allocUnsafe)?function(r){if(!Cn(r))throw new TypeError(S("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));return df.allocUnsafe(r)}:function(r){if(!Cn(r))throw new TypeError(S("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));return new df(r)};function yf(r){if("function"!=typeof r)throw new TypeError(S("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!ha(t))return!1;if(e=t.length,0===e)return!1;for(n=0;n0&&t.push("generic"),t)}function Of(){return{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256}}N(Vf,"enum",Of),function(r,t){var e,n,o;for(e=se(t),o=0;ot?t:r}function Nf(r,t){var e=t+1;return r<0?((r+=e)<0&&0!==(r%=e)&&(r+=e),r):r>t?((r-=e)>t&&(r%=e),r):r}var Cf=ii(ye()),kf={wrap:Nf,clamp:Ff,normalize:function(r,t){var e=tn(r,t);if(e<0||e>t)throw new RangeError(S("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return e},throw:function(r,t){if(r<0||r>t)throw new RangeError(S("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return r}};function Yf(r,t,e){var n;if("clamp"===e)return Ff(r,t);if("wrap"===e)return Nf(r,t);if(n=r,"normalize"===e&&(n=tn(n,t)),n<0||n>t)throw new RangeError(S("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return n}N(Yf,"factory",(function(r){if(!Cf(r))throw new TypeError(S("invalid argument. First argument must be a recognized index mode. Value: `%s`.",r));return kf[r]}));var Df=Se.prototype.iget;var zf=Se.prototype.iset;function Wf(r,t){var e,n;for(e=[],n=0;n0))throw new TypeError(S("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",e));if((f=e.length)>Gf)throw new RangeError(S("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",Gf,f));if(!bf(n))throw new TypeError(S("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",n));if(f>0){if(n.length!==f)throw new RangeError(S("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",f,n.length))}else{if(1!==n.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==n[0])throw new RangeError(S("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",n[0]))}if(!Fn(o))throw new TypeError(S("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",o));if(!function(r){var t;for(t=0;t0&&!function(r,t,e,n){var o=cr(t,e,n);return o[0]>=0&&o[1]0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if((s={}).mode=Jf,s.readonly=$f,arguments.length>6&&(u=function(r,t){var e;if(!la(t))return new TypeError(S("invalid argument. Options argument must be an object. Value: `%s`.",t));if(W(t,"mode")&&(r.mode=t.mode,!Cf(r.mode)))return new TypeError(S("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",r.mode));if(W(t,"submode")){if(r.submode=t.submode,!Vr(r.submode))return new TypeError(S("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",r.submode));if(0===r.submode.length)return new TypeError(S("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",r.submode.join(",")));for(e=0;e0){if(!Yt(r))throw new TypeError(S("invalid argument. Index must be an integer. Value: `%s`.",r));return r=Yf(r,this._length-1,this._mode),Df.call(this,r)}return Df.call(this)})),N(Zf.prototype,"set",(function(){var r,t,e,n;if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(arguments.length!==this._ndims+1)throw new RangeError(S("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(r=this._offset,e=this._submode.length,n=0;n0){if(!Yt(r))throw new TypeError(S("invalid argument. Index must be an integer. Value: `%s`.",r));r=Yf(r,this._length-1,this._mode),zf.call(this,r,t)}else zf.call(this,r);return this}));var Kf=If.get("dtypes.default"),qf=If.get("order");function Xf(r){var t,e,n,o,i,a,f,s;if(o={},arguments.length>1){if(!la(t=arguments[1]))throw new TypeError(S("invalid argument. Options argument must be an object. Value: `%s`.",t));e=W(t,"dtype")?t.dtype:Kf,n=W(t,"order")?t.order:qf,W(t,"mode")&&(o.mode=t.mode),W(t,"submode")&&(o.submode=t.submode)}else e=Kf,n=qf;if("number"==typeof r)s=[r];else{if(!ha(r))throw new TypeError(S("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));s=r}if(s.length>0){if((a=Ye(s))!=a||a<0)throw new TypeError(S("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));f=Ge(s,n)}else a=1,f=[0];return i="binary"===e?gf(a):function(r){return arguments.length>1?Zo(r,arguments[1]):Zo(r)}(a,e),new Zf(e,i,s,f,Ze(s,f),n,o)}function Hf(){var r,t=arguments,e="https://stdlib.io/e/"+t[0]+"?";for(r=1;rt)return new RangeError(Hf("invalid option. `%s` option specifies more dimensions than exists in the input array. Number of dimensions: %d. Option: [%s].",t,jo(r.dims,",")));r.dims=n}return null}var ts=If.get("dtypes.integer_index");function es(r,t){var e,n,o,i,a,f;if(!Ie(r))throw new TypeError(Hf("null5t",r));if(i=function(r){var t,e,n,o;if("object"!=typeof r||null===r)throw new TypeError(S("invalid argument. Must provide an ndarray. Value: `%s`.",r));if(!Qt(e=r.shape))throw new TypeError(S("invalid argument. Must provide an ndarray. Value: `%s`.",r));for(t=[],o=0;o1&&(n=rs(e,a,t)))throw n;return null===e.dims&&(e.dims=Bo(a)),xi(zi,[r,f=Xf(Lo(i,o=nn(a,e.dims)),{dtype:ts,order:He(r)})],e.dims),e.keepdims&&(f=ia(a,f,o)),f}return N(es,"assign",(function(r,t,e){var n,o,i;if(!Ie(r))throw new TypeError(Hf("null5t",r));if(!Ie(t))throw new TypeError(Hf("invalid argument. Second argument must be an ndarray-like object. Value: `%s`.",t));if(i=function(r){var t,e;if("object"!=typeof r||null===r)throw new TypeError(S("invalid argument. Must provide an ndarray. Value: `%s`.",r));if(Fn(e=r.ndims))return e;if(!Qt(t=r.shape))throw new TypeError(S("invalid argument. Must provide an ndarray. Value: `%s`.",r));return t.length}(r),n=Hi({},Qf),arguments.length>2&&(o=rs(n,i,e)))throw o;return null===n.dims&&(n.dims=Bo(i)),xi(zi,[r,t],n.dims),t})),es})); +//# sourceMappingURL=browser.js.map diff --git a/browser.js.map b/browser.js.map new file mode 100644 index 0000000..fe02463 --- /dev/null +++ b/browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-global/lib/browser.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-has-bigint-support/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/ndarray-base-bytes-per-element/lib/main.js","../node_modules/@stdlib/ndarray-base-iteration-order/lib/main.js","../node_modules/@stdlib/math-base-special-abs/lib/main.js","../node_modules/@stdlib/ndarray-base-strides2order/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/is_column_major_contiguous.js","../node_modules/@stdlib/ndarray-base-ctor/lib/is_row_major_contiguous.js","../node_modules/@stdlib/ndarray-base-minmax-view-buffer-index/lib/main.js","../node_modules/@stdlib/complex-float64-real/lib/main.js","../node_modules/@stdlib/complex-float64-imag/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/ndarray-base-minmax-view-buffer-index/lib/index.js","../node_modules/@stdlib/ndarray-base-minmax-view-buffer-index/lib/assign.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-escape-regexp-string/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/assert-is-regexp/lib/exec.js","../node_modules/@stdlib/assert-is-regexp/lib/main.js","../node_modules/@stdlib/assert-is-regexp/lib/try2exec.js","../node_modules/@stdlib/string-base-replace/lib/main.js","../node_modules/@stdlib/string-replace/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/tostring.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-little-endian/lib/main.js","../node_modules/@stdlib/assert-is-little-endian/lib/ctors.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-has-arraybuffer-support/lib/arraybuffer.js","../node_modules/@stdlib/array-buffer/lib/main.js","../node_modules/@stdlib/array-buffer/lib/index.js","../node_modules/@stdlib/assert-has-arraybuffer-support/lib/main.js","../node_modules/@stdlib/array-buffer/lib/polyfill.js","../node_modules/@stdlib/assert-is-dataview/lib/main.js","../node_modules/@stdlib/assert-has-dataview-support/lib/dataview.js","../node_modules/@stdlib/array-dataview/lib/main.js","../node_modules/@stdlib/array-dataview/lib/index.js","../node_modules/@stdlib/assert-has-dataview-support/lib/main.js","../node_modules/@stdlib/array-dataview/lib/polyfill.js","../node_modules/@stdlib/bigint-ctor/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/node_modules/@stdlib/ndarray-dtypes/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/node_modules/@stdlib/ndarray-dtypes/lib/enum.js","../node_modules/@stdlib/utils-define-read-only-property/lib/main.js","../node_modules/@stdlib/utils-keys/lib/builtin.js","../node_modules/@stdlib/utils-keys/lib/has_builtin.js","../node_modules/@stdlib/assert-is-arguments/lib/detect.js","../node_modules/@stdlib/assert-is-arguments/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/math-base-assert-is-nan/lib/main.js","../node_modules/@stdlib/assert-is-nan/lib/primitive.js","../node_modules/@stdlib/assert-is-nan/lib/object.js","../node_modules/@stdlib/assert-is-nan/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/assert-is-nan/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/native.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/has_string_enumerability_bug.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-is-arguments/lib/index.js","../node_modules/@stdlib/assert-is-arguments/lib/polyfill.js","../node_modules/@stdlib/utils-keys/lib/builtin_wrapper.js","../node_modules/@stdlib/utils-keys/lib/has_enumerable_prototype_bug.js","../node_modules/@stdlib/utils-noop/lib/main.js","../node_modules/@stdlib/utils-keys/lib/has_non_enumerable_properties_bug.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/utils-index-of/lib/main.js","../node_modules/@stdlib/utils-keys/lib/is_constructor_prototype.js","../node_modules/@stdlib/utils-keys/lib/window.js","../node_modules/@stdlib/utils-keys/lib/has_automation_equality_bug.js","../node_modules/@stdlib/utils-keys/lib/has_window.js","../node_modules/@stdlib/utils-keys/lib/main.js","../node_modules/@stdlib/utils-keys/lib/has_arguments_bug.js","../node_modules/@stdlib/utils-keys/lib/polyfill.js","../node_modules/@stdlib/utils-keys/lib/is_constructor_prototype_wrapper.js","../node_modules/@stdlib/ndarray-base-ctor/node_modules/@stdlib/ndarray-dtypes/lib/index.js","../node_modules/@stdlib/ndarray-base-ctor/node_modules/@stdlib/ndarray-dtypes/lib/assign.js","../node_modules/@stdlib/ndarray-orders/lib/main.js","../node_modules/@stdlib/blas-base-layouts/lib/enum.js","../node_modules/@stdlib/blas-base-layouts/lib/index.js","../node_modules/@stdlib/blas-base-layouts/lib/main.js","../node_modules/@stdlib/ndarray-orders/lib/enum.js","../node_modules/@stdlib/ndarray-orders/lib/index.js","../node_modules/@stdlib/ndarray-index-modes/lib/main.js","../node_modules/@stdlib/ndarray-index-modes/lib/enum.js","../node_modules/@stdlib/ndarray-index-modes/lib/index.js","../node_modules/@stdlib/ndarray-base-ctor/lib/meta2dataview.js","../node_modules/@stdlib/number-float64-base-to-int64-bytes/lib/assign.js","../node_modules/@stdlib/number-float64-base-to-int64-bytes/lib/index.js","../node_modules/@stdlib/number-float64-base-to-int64-bytes/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/meta2dataview.polyfill.js","../node_modules/@stdlib/ndarray-base-ctor/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/is_contiguous.js","../node_modules/@stdlib/assert-is-ndarray-like/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/copy_flags.js","../node_modules/@stdlib/ndarray-base-ctor/lib/get.js","../node_modules/@stdlib/ndarray-base-ctor/lib/iget.js","../node_modules/@stdlib/ndarray-base-ctor/lib/set.js","../node_modules/@stdlib/ndarray-base-ctor/lib/iset.js","../node_modules/@stdlib/ndarray-base-ctor/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-accessor-array/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-setter/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-setter/lib/main.js","../node_modules/@stdlib/ndarray-base-numel/lib/main.js","../node_modules/@stdlib/ndarray-base-dtype/lib/main.js","../node_modules/@stdlib/array-base-copy-indexed/lib/main.js","../node_modules/@stdlib/ndarray-base-shape/lib/main.js","../node_modules/@stdlib/ndarray-base-shape2strides/lib/main.js","../node_modules/@stdlib/ndarray-base-shape2strides/lib/index.js","../node_modules/@stdlib/ndarray-base-shape2strides/lib/assign.js","../node_modules/@stdlib/ndarray-base-strides/lib/main.js","../node_modules/@stdlib/ndarray-base-strides2offset/lib/main.js","../node_modules/@stdlib/ndarray-base-offset/lib/main.js","../node_modules/@stdlib/ndarray-base-order/lib/main.js","../node_modules/@stdlib/ndarray-base-data-buffer/lib/main.js","../node_modules/@stdlib/ndarray-base-ndarraylike2object/lib/main.js","../node_modules/@stdlib/ndarray-base-normalize-index/lib/main.js","../node_modules/@stdlib/ndarray-base-to-unique-normalized-indices/lib/main.js","../node_modules/@stdlib/array-base-indices-complement/lib/main.js","../node_modules/@stdlib/array-base-take-indexed2/lib/main.js","../node_modules/@stdlib/array-dtype/lib/ctor2dtype.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/complex-float64-ctor/lib/main.js","../node_modules/@stdlib/complex-float64-ctor/lib/tostring.js","../node_modules/@stdlib/complex-float64-ctor/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32-ctor/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32-ctor/lib/tostring.js","../node_modules/@stdlib/complex-float32-ctor/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-dtype/lib/ctors.js","../node_modules/@stdlib/array-dtype/lib/dtypes.js","../node_modules/@stdlib/array-dtype/lib/main.js","../node_modules/@stdlib/array-base-arraylike2object/lib/main.js","../node_modules/@stdlib/assert-is-undefined-or-null/lib/main.js","../node_modules/@stdlib/array-base-join/lib/main.js","../node_modules/@stdlib/array-base-zero-to/lib/main.js","../node_modules/@stdlib/array-base-zero-to/lib/assign.js","../node_modules/@stdlib/array-base-take-indexed/lib/main.js","../node_modules/@stdlib/ndarray-base-unary-loop-interchange-order/lib/main.js","../node_modules/@stdlib/ndarray-base-unary-loop-interchange-order/lib/sort2ins.js","../node_modules/@stdlib/array-base-zero-to/lib/index.js","../node_modules/@stdlib/ndarray-base-unary-tiling-block-size/lib/defaults.js","../node_modules/@stdlib/ndarray-base-unary-tiling-block-size/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/increment_offsets.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/set_view_offsets.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/offsets.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-without/node_modules/@stdlib/array-dtype/lib/ctor2dtype.js","../node_modules/@stdlib/array-bool/lib/from_iterator.js","../node_modules/@stdlib/array-bool/lib/main.js","../node_modules/@stdlib/array-bool/lib/from_array.js","../node_modules/@stdlib/array-bool/lib/from_iterator_map.js","../node_modules/@stdlib/array-base-without/node_modules/@stdlib/array-dtype/lib/ctors.js","../node_modules/@stdlib/array-base-without/node_modules/@stdlib/array-dtype/lib/dtypes.js","../node_modules/@stdlib/array-base-without/node_modules/@stdlib/array-dtype/lib/main.js","../node_modules/@stdlib/array-base-assert-contains/lib/factory.js","../node_modules/@stdlib/array-base-assert-contains/lib/index.js","../node_modules/@stdlib/array-base-assert-contains/lib/main.js","../node_modules/@stdlib/array-dtypes/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex-floating-point-data-type/lib/main.js","../node_modules/@stdlib/array-base-assert-is-boolean-data-type/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-boolean/lib/main.js","../node_modules/@stdlib/array-base-without/lib/assign.js","../node_modules/@stdlib/array-base-without/lib/main.js","../node_modules/@stdlib/ndarray-base-vind2bind/lib/main.js","../node_modules/@stdlib/array-base-without/lib/index.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/nd_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/nd.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/main.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/0d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/1d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/2d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/3d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/4d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/5d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/6d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/7d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/8d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/9d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/10d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/0d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/1d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/2d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/3d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/4d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/5d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/6d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/7d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/8d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/9d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/10d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/2d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/3d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/4d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/5d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/6d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/7d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/8d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/9d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/10d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/2d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/3d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/4d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/5d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/6d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/7d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/8d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/9d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/10d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/initialize_array_views.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/index.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/factory.js","../node_modules/@stdlib/array-base-assert-is-complex-typed-array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-booleanarray/lib/main.js","../node_modules/@stdlib/blas-base-gscal/lib/main.js","../node_modules/@stdlib/ndarray-base-nullary-loop-interchange-order/lib/main.js","../node_modules/@stdlib/ndarray-base-nullary-loop-interchange-order/lib/sort2ins.js","../node_modules/@stdlib/blas-base-gscal/lib/index.js","../node_modules/@stdlib/blas-base-gscal/lib/ndarray.js","../node_modules/@stdlib/ndarray-base-nullary-tiling-block-size/lib/defaults.js","../node_modules/@stdlib/ndarray-base-nullary-tiling-block-size/lib/main.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/nd_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/nd_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/nd.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/main.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/0d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/1d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/0d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/1d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/0d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/1d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_blocked_complex.js","../node_modules/@stdlib/object-assign/lib/has_object_assign.js","../node_modules/@stdlib/object-assign/lib/builtin.js","../node_modules/@stdlib/utils-property-symbols/lib/has_builtin.js","../node_modules/@stdlib/object-ctor/lib/main.js","../node_modules/@stdlib/utils-property-symbols/lib/builtin.js","../node_modules/@stdlib/utils-property-symbols/lib/index.js","../node_modules/@stdlib/object-assign/lib/index.js","../node_modules/@stdlib/utils-property-symbols/lib/polyfill.js","../node_modules/@stdlib/utils-enumerable-properties/lib/main.js","../node_modules/@stdlib/object-assign/lib/polyfill.js","../node_modules/@stdlib/ndarray-base-flag/lib/main.js","../node_modules/@stdlib/ndarray-base-flags/lib/main.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/node_modules/@stdlib/array-dtype/lib/ctor2dtype.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/node_modules/@stdlib/array-dtype/lib/ctors.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/node_modules/@stdlib/array-dtype/lib/dtypes.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/node_modules/@stdlib/array-dtype/lib/main.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/lib/main.js","../node_modules/@stdlib/ndarray-base-spread-dimensions/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-row-major-string/lib/main.js","../node_modules/@stdlib/array-base-ones/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-read-only/lib/main.js","../node_modules/@stdlib/utils-get-prototype-of/lib/native.js","../node_modules/@stdlib/utils-get-prototype-of/lib/detect.js","../node_modules/@stdlib/utils-get-prototype-of/lib/polyfill.js","../node_modules/@stdlib/utils-get-prototype-of/lib/proto.js","../node_modules/@stdlib/assert-is-plain-object/lib/main.js","../node_modules/@stdlib/utils-get-prototype-of/lib/main.js","../node_modules/@stdlib/assert-is-array-like/lib/main.js","../node_modules/@stdlib/buffer-ctor/lib/main.js","../node_modules/@stdlib/buffer-ctor/lib/index.js","../node_modules/@stdlib/buffer-ctor/lib/polyfill.js","../node_modules/@stdlib/buffer-alloc-unsafe/lib/index.js","../node_modules/@stdlib/buffer-alloc-unsafe/lib/has_alloc_unsafe.js","../node_modules/@stdlib/buffer-alloc-unsafe/lib/main.js","../node_modules/@stdlib/buffer-alloc-unsafe/lib/polyfill.js","../node_modules/@stdlib/assert-tools-array-like-function/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer-array/lib/index.js","../node_modules/@stdlib/assert-is-integer-array/lib/index.js","../node_modules/@stdlib/ndarray-base-assert-is-order/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/node_modules/@stdlib/ndarray-dtypes/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/node_modules/@stdlib/ndarray-dtypes/lib/enum.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/node_modules/@stdlib/ndarray-dtypes/lib/index.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/node_modules/@stdlib/ndarray-dtypes/lib/assign.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/lib/main.js","../node_modules/@stdlib/ndarray-defaults/lib/main.js","../node_modules/@stdlib/ndarray-defaults/lib/get.js","../node_modules/@stdlib/utils-inherit/lib/validate.js","../node_modules/@stdlib/ndarray-defaults/lib/index.js","../node_modules/@stdlib/utils-inherit/lib/native.js","../node_modules/@stdlib/utils-inherit/lib/polyfill.js","../node_modules/@stdlib/utils-inherit/lib/detect.js","../node_modules/@stdlib/ndarray-base-clamp-index/lib/main.js","../node_modules/@stdlib/ndarray-base-wrap-index/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-index-mode/lib/main.js","../node_modules/@stdlib/ndarray-base-ind/lib/factory.js","../node_modules/@stdlib/ndarray-base-ind/lib/main.js","../node_modules/@stdlib/ndarray-base-ind/lib/index.js","../node_modules/@stdlib/ndarray-ctor/lib/iget.js","../node_modules/@stdlib/ndarray-ctor/lib/iset.js","../node_modules/@stdlib/ndarray-ctor/lib/copy_array.js","../node_modules/@stdlib/ndarray-ctor/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-buffer-length-compatible/lib/main.js","../node_modules/@stdlib/ndarray-ctor/lib/validate.js","../node_modules/@stdlib/utils-inherit/lib/main.js","../node_modules/@stdlib/ndarray-ctor/lib/get.js","../node_modules/@stdlib/ndarray-ctor/lib/set.js","../node_modules/@stdlib/ndarray-empty/lib/main.js","../node_modules/@stdlib/array-empty/lib/polyfill.js","../node_modules/@stdlib/error-tools-fmtprodmsg/lib/main.js","../lib/validate.js","../node_modules/@stdlib/assert-is-empty-collection/lib/main.js","../lib/main.js","../node_modules/@stdlib/ndarray-shape/lib/main.js","../lib/index.js","../lib/assign.js","../node_modules/@stdlib/ndarray-ndims/lib/main.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e' );\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating whether a value is `NaN`.\n*\n* @private\n* @param {*} value - input value\n* @returns {boolean} boolean indicating whether a value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 4 );\n* // returns false\n*/\nfunction isnan( value ) { // explicitly define a function here instead of `@stdlib/math/base/assert/is-nan` in order to avoid circular dependencies\n\treturn ( value !== value );\n}\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\ttoken.arg = String( token.arg );\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ? String( token.arg ) : fromCharCode( num ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @private\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// VARIABLES //\n\nvar Global = getGlobal();\n\n\n// MAIN //\n\n/**\n* Tests for native `BigInt` support.\n*\n* @returns {boolean} boolean indicating if an environment has `BigInt` support\n*\n* @example\n* var bool = hasBigIntSupport();\n* // returns \n*/\nfunction hasBigIntSupport() {\n\treturn (\n\t\ttypeof Global.BigInt === 'function' &&\n\t\ttypeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals\n\t\ttypeof Global.BigInt( '1' ) === 'bigint' &&\n\t\ttypeof BigInt( '1' ) === 'bigint' // eslint-disable-line stdlib/require-globals, no-undef\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasBigIntSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport BYTES_PER_ELEMENT from './bytes_per_element.json';\n\n\n// MAIN //\n\n/**\n* Returns the number of bytes per element provided an underlying array data type.\n*\n* @param {string} dtype - data type\n* @returns {(NonNegativeInteger|null)} number of bytes per element\n*\n* @example\n* var nbytes = bytesPerElement( 'float64' );\n* // returns 8\n*\n* nbytes = bytesPerElement( 'generic' );\n* // returns null\n*/\nfunction bytesPerElement( dtype ) {\n\treturn BYTES_PER_ELEMENT[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default bytesPerElement;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns array iteration order.\n*\n* ## Notes\n*\n* - Return value key:\n*\n* - `0`: unordered (i.e., strides of mixed sign; e.g., `[ 9, -3, 1 ]`)\n* - `1`: ordered left-to-right (i.e., all nonnegative strides)\n* - `-1`: ordered right-to-left (i.e., all negative strides)\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} iteration order\n*\n* @example\n* var o = iterationOrder( [ 2, 1 ] );\n* // returns 1\n*\n* o = iterationOrder( [ -2, 1 ] );\n* // returns 0\n*\n* o = iterationOrder( [ -2, -1 ] );\n* // returns -1\n*/\nfunction iterationOrder( strides ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < strides.length; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\tif ( cnt === 0 ) {\n\t\t// All nonnegative strides:\n\t\treturn 1|0; // asm-type annotation\n\t}\n\tif ( cnt === strides.length ) {\n\t\t// All negative strides:\n\t\treturn -1|0; // asm-type annotation\n\t}\n\t// Strides of mixed signs:\n\treturn 0|0; // asm-type annotation\n}\n\n\n// EXPORTS //\n\nexport default iterationOrder;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the absolute value of a double-precision floating-point number `x`.\n*\n* @param {number} x - input value\n* @returns {number} absolute value\n*\n* @example\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* @example\n* var v = abs( 2.0 );\n* // returns 2.0\n*\n* @example\n* var v = abs( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( -0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( NaN );\n* // returns NaN\n*/\nfunction abs( x ) {\n\treturn Math.abs( x ); // eslint-disable-line stdlib/no-builtin-math\n}\n\n\n// EXPORTS //\n\nexport default abs;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport abs from '@stdlib/math-base-special-abs';\n\n\n// MAIN //\n\n/**\n* Determines the order of a multidimensional array based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} order\n*\n* @example\n* import strides2order from '@stdlib/ndarray-base-strides2order';\n*\n* var order = strides2order( [ 2, 1 ] );\n* // returns 1\n*\n* order = strides2order( [ 1, 2 ] );\n* // returns 2\n*\n* order = strides2order( [ 1, 1, 1 ] );\n* // returns 3\n*\n* order = strides2order( [ 2, 3, 1 ] );\n* // returns 0\n*/\nfunction strides2order( strides ) {\n\tvar column;\n\tvar ndims;\n\tvar row;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0|0; // 'none'\n\t}\n\tcolumn = true;\n\trow = true;\n\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( column && s2 < s1 ) {\n\t\t\tcolumn = false;\n\t\t} else if ( row && s2 > s1 ) {\n\t\t\trow = false;\n\t\t}\n\t\tif ( row || column ) {\n\t\t\ts1 = s2;\n\t\t} else {\n\t\t\treturn 0|0; // 'none'\n\t\t}\n\t}\n\tif ( row && column ) {\n\t\treturn 3|0; // 'both'\n\t}\n\tif ( row ) {\n\t\treturn 1|0; // 'row-major'\n\t}\n\treturn 2|0; // 'column-major'\n}\n\n\n// EXPORTS //\n\nexport default strides2order;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Determines if an array is column-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is column-major contiguous\n*/\nfunction isColumnMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 2 || order === 3 );\n}\n\n\n// EXPORTS //\n\nexport default isColumnMajorContiguous;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Determines if an array is row-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is row-major contiguous\n*/\nfunction isRowMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 1 || order === 3 );\n}\n\n\n// EXPORTS //\n\nexport default isRowMajorContiguous;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {Array} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn [ offset, offset ];\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\treturn [ min, max ];\n}\n\n\n// EXPORTS //\n\nexport default minmaxViewBufferIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @module @stdlib/ndarray-base-minmax-view-buffer-index\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view and assigns results to a provided output array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset, out ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\tout[ 0 ] = offset;\n\t\t\tout[ 1 ] = offset;\n\t\t\treturn out;\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\tout[ 0 ] = min;\n\tout[ 1 ] = max;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default minmaxViewBufferIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar RE_CHARS = /[-\\/\\\\^$*+?.()|[\\]{}]/g; // eslint-disable-line no-useless-escape\n\n\n// MAIN //\n\n/**\n* Escapes a regular expression string.\n*\n* @param {string} str - regular expression string\n* @throws {TypeError} first argument must be a string\n* @returns {string} escaped string\n*\n* @example\n* var str = rescape( '[A-Z]*' );\n* // returns '\\\\[A\\\\-Z\\\\]\\\\*'\n*/\nfunction rescape( str ) {\n\tvar len;\n\tvar s;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a regular expression string. Value: `%s`.', str ) );\n\t}\n\t// Check if the string starts with a forward slash...\n\tif ( str[ 0 ] === '/' ) {\n\t\t// Find the last forward slash...\n\t\tlen = str.length;\n\t\tfor ( i = len-1; i >= 0; i-- ) {\n\t\t\tif ( str[ i ] === '/' ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t// If we searched the string to no avail or if the first letter is not `/`, assume that the string is not of the form `/[...]/[guimy]`:\n\tif ( i === void 0 || i <= 0 ) {\n\t\treturn str.replace( RE_CHARS, '\\\\$&' );\n\t}\n\t// We need to de-construct the string...\n\ts = str.substring( 1, i );\n\n\t// Only escape the characters between the `/`:\n\ts = s.replace( RE_CHARS, '\\\\$&' );\n\n\t// Reassemble:\n\tstr = str[ 0 ] + s + str.substring( i );\n\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default rescape;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar exec = RegExp.prototype.exec; // non-generic\n\n\n// EXPORTS //\n\nexport default exec;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2exec.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a regular expression.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a regular expression\n*\n* @example\n* var bool = isRegExp( /\\.+/ );\n* // returns true\n*\n* @example\n* var bool = isRegExp( {} );\n* // returns false\n*/\nfunction isRegExp( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof RegExp ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object RegExp]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isRegExp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport exec from './exec.js';\n\n\n// MAIN //\n\n/**\n* Attempts to call a `RegExp` method.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if able to call a `RegExp` method\n*/\nfunction test( value ) {\n\ttry {\n\t\texec.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Replaces search occurrences with a replacement string.\n*\n* @param {string} str - input string\n* @param {RegExp} search - search expression\n* @param {(string|Function)} newval - replacement value or function\n* @returns {string} new string containing replacement(s)\n*\n* @example\n* var str = 'Hello World';\n* var out = replace( str, /world/i, 'Mr. President' );\n* // returns 'Hello Mr. President'\n*\n* @example\n* import capitalize from '@stdlib/string-base-capitalize';\n*\n* var str = 'Oranges and lemons say the bells of St. Clement\\'s';\n*\n* function replacer( match, p1 ) {\n* return capitalize( p1 );\n* }\n*\n* var out = replace( str, /([^\\s]*)/gi, replacer );\n* // returns 'Oranges And Lemons Say The Bells Of St. Clement\\'s'\n*/\nfunction replace( str, search, newval ) {\n\treturn str.replace( search, newval );\n}\n\n\n// EXPORTS //\n\nexport default replace;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport rescape from '@stdlib/utils-escape-regexp-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isRegExp from '@stdlib/assert-is-regexp';\nimport format from '@stdlib/string-format';\nimport base from '@stdlib/string-base-replace';\n\n\n// MAIN //\n\n/**\n* Replaces search occurrences with a replacement string.\n*\n* @param {string} str - input string\n* @param {(string|RegExp)} search - search expression\n* @param {(string|Function)} newval - replacement value or function\n* @throws {TypeError} first argument must be a string\n* @throws {TypeError} second argument argument must be a string or regular expression\n* @throws {TypeError} third argument must be a string or function\n* @returns {string} new string containing replacement(s)\n*\n* @example\n* var str = 'beep';\n* var out = replace( str, 'e', 'o' );\n* // returns 'boop'\n*\n* @example\n* var str = 'Hello World';\n* var out = replace( str, /world/i, 'Mr. President' );\n* // returns 'Hello Mr. President'\n*\n* @example\n* import capitalize from '@stdlib/string-capitalize';\n*\n* var str = 'Oranges and lemons say the bells of St. Clement\\'s';\n*\n* function replacer( match, p1 ) {\n* return capitalize( p1 );\n* }\n*\n* var out = replace( str, /([^\\s]*)/gi, replacer );\n* // returns 'Oranges And Lemons Say The Bells Of St. Clement\\'s'\n*/\nfunction replace( str, search, newval ) {\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\tif ( isString( search ) ) {\n\t\tsearch = new RegExp( rescape( search ), 'g' );\n\t} else if ( !isRegExp( search ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a string or regular expression. Value: `%s`.', search ) );\n\t}\n\tif ( !isString( newval ) && !isFunction( newval ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be a string or replacement function. Value: `%s`.', newval ) );\n\t}\n\treturn base( str, search, newval );\n}\n\n\n// EXPORTS //\n\nexport default replace;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport replace from '@stdlib/string-replace';\nimport real from '@stdlib/complex-float64-real';\nimport imag from '@stdlib/complex-float64-imag';\n\n\n// VARIABLES //\n\nvar CTORS = {\n\t'int8': 'new Int8Array( [ {{data}} ] )',\n\t'uint8': 'new Uint8Array( [ {{data}} ] )',\n\t'uint8c': 'new Uint8ClampedArray( [ {{data}} ] )',\n\t'int16': 'new Int16Array( [ {{data}} ] )',\n\t'uint16': 'new Uint16Array( [ {{data}} ] )',\n\t'int32': 'new Int32Array( [ {{data}} ] )',\n\t'uint32': 'new Uint32Array( [ {{data}} ] )',\n\t'float32': 'new Float32Array( [ {{data}} ] )',\n\t'float64': 'new Float64Array( [ {{data}} ] )',\n\t'generic': '[ {{data}} ]',\n\t'binary': 'new Buffer( [ {{data}} ] )',\n\t'complex64': 'new Complex64Array( [ {{data}} ] )',\n\t'complex128': 'new Complex128Array( [ {{data}} ] )'\n};\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {string} string representation\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar buffer;\n\tvar ndims;\n\tvar ctor;\n\tvar str;\n\tvar dt;\n\tvar v;\n\tvar i;\n\n\tndims = this._shape.length;\n\tdt = this._dtype;\n\n\t// Function to invoke to create an ndarray:\n\tstr = 'ndarray( \\''+dt+'\\', ';\n\n\t// Data buffer parameter...\n\tbuffer = '';\n\tif ( this._length <= 100 ) {\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// First three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbuffer += ', ..., ';\n\n\t\t// Last three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tv = this.iget( this._length-1-i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tbuffer += this.iget( this._length-1-i );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tctor = CTORS[ this.dtype ];\n\tstr += replace( ctor, '{{data}}', buffer );\n\tstr += ', ';\n\n\t// Array shape...\n\tif ( ndims === 0 ) {\n\t\tstr += '[]';\n\t} else {\n\t\tstr += '[ ' + this._shape.join( ', ' ) + ' ]';\n\t}\n\tstr += ', ';\n\n\t// Stride array...\n\tstr += '[ ';\n\tif ( ndims === 0 ) {\n\t\tstr += '0';\n\t} else {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( this._strides[ i ] < 0 ) {\n\t\t\t\tstr += -this._strides[ i ];\n\t\t\t} else {\n\t\t\t\tstr += this._strides[ i ];\n\t\t\t}\n\t\t\tif ( i < ndims-1 ) {\n\t\t\t\tstr += ', ';\n\t\t\t}\n\t\t}\n\t}\n\tstr += ' ]';\n\tstr += ', ';\n\n\t// Buffer offset:\n\tstr += '0';\n\tstr += ', ';\n\n\t// Order:\n\tstr += '\\'' + this._order + '\\'';\n\n\t// Close the function call:\n\tstr += ' )';\n\treturn str;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctors from './ctors.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if an environment is little endian.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment is little endian\n*\n* @example\n* var bool = isLittleEndian();\n* // returns \n*/\nfunction isLittleEndian() {\n\tvar uint16view;\n\tvar uint8view;\n\n\tuint16view = new ctors[ 'uint16' ]( 1 );\n\n\t/*\n\t* Set the uint16 view to a value having distinguishable lower and higher order words.\n\t*\n\t* 4660 => 0x1234 => 0x12 0x34 => '00010010 00110100' => (0x12,0x34) == (18,52)\n\t*/\n\tuint16view[ 0 ] = 0x1234;\n\n\t// Create a uint8 view on top of the uint16 buffer:\n\tuint8view = new ctors[ 'uint8' ]( uint16view.buffer );\n\n\t// If little endian, the least significant byte will be first...\n\treturn ( uint8view[ 0 ] === 0x34 );\n}\n\n\n// MAIN //\n\nbool = isLittleEndian();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint16Array from '@stdlib/array-uint16';\n\n\n// MAIN //\n\nvar ctors = {\n\t'uint16': Uint16Array,\n\t'uint8': Uint8Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @module @stdlib/array-buffer\n*\n* @example\n* import ctor from '@stdlib/array-buffer';\n*\n* var buf = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasArrayBufferSupport from '@stdlib/assert-has-arraybuffer-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasArrayBufferSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport Float64Array from '@stdlib/array-float64';\nimport GlobalArrayBuffer from './arraybuffer.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `ArrayBuffer` support.\n*\n* @returns {boolean} boolean indicating if an environment has `ArrayBuffer` support\n*\n* @example\n* var bool = hasArrayBufferSupport();\n* // returns \n*/\nfunction hasArrayBufferSupport() {\n\tvar bool;\n\tvar view;\n\tvar buf;\n\n\tif ( typeof GlobalArrayBuffer !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tbuf = new GlobalArrayBuffer( 16 );\n\t\tbool = ( isArrayBuffer( buf ) && typeof GlobalArrayBuffer.isView === 'function' );\n\t\tif ( bool ) {\n\t\t\tview = new Float64Array( buf );\n\t\t\tview[ 0 ] = -3.14;\n\t\t\tview[ 1 ] = NaN;\n\t\t\tbool = (\n\t\t\t\tbool &&\n\t\t\t\tGlobalArrayBuffer.isView( view ) &&\n\t\t\t\tbuf.byteLength === 16 &&\n\t\t\t\tview[ 0 ] === -3.14 &&\n\t\t\t\tview[ 1 ] !== view[ 1 ]\n\t\t\t);\n\t\t}\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasArrayBufferSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasDataView = ( typeof DataView === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `DataView`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a DataView\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import DataView from '@stdlib/array-dataview';\n*\n* var bool = isDataView( new DataView( new ArrayBuffer( 10 ) ) );\n* // returns true\n*\n* @example\n* var bool = isDataView( [] );\n* // returns false\n*/\nfunction isDataView( value ) {\n\treturn (\n\t\t( hasDataView && value instanceof DataView ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object DataView]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isDataView;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof DataView === 'function' ) ? DataView : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof DataView === 'function' ) ? DataView : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Constructor which returns a data view representing a provided array buffer.\n*\n* @module @stdlib/array-dataview\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import DataView from '@stdlib/array-dataview';\n*\n* var buf = new ArrayBuffer( 10 );\n* // returns \n*\n* var dv = new DataView( buf );\n* // returns \n*/\n\n// MODULES //\n\nimport hasDataViewSupport from '@stdlib/assert-has-dataview-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasDataViewSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isDataView from '@stdlib/assert-is-dataview';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport GlobalDataView from './dataview.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `DataView` support.\n*\n* @returns {boolean} boolean indicating if an environment has `DataView` support\n*\n* @example\n* var bool = hasDataViewSupport();\n* // returns \n*/\nfunction hasDataViewSupport() {\n\tvar bool;\n\tvar view;\n\tvar buf;\n\n\tif ( typeof GlobalDataView !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tbuf = new ArrayBuffer( 24 );\n\t\tview = new GlobalDataView( buf, 8 );\n\t\tbool = ( isDataView( view ) && typeof view.getFloat64 === 'function' && typeof view.setFloat64 === 'function' );\n\t\tif ( bool ) {\n\t\t\tview.setFloat64( 0, -3.14 );\n\t\t\tview.setFloat64( 8, NaN );\n\t\t\tbool = (\n\t\t\t\tbool &&\n\t\t\t\tview.buffer === buf &&\n\t\t\t\tview.byteLength === 16 &&\n\t\t\t\tview.byteOffset === 8 &&\n\t\t\t\tview.getFloat64( 0 ) === -3.14 &&\n\t\t\t\tview.getFloat64( 8 ) !== view.getFloat64( 8 )\n\t\t\t);\n\t\t}\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasDataViewSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Constructor which returns a data view representing a provided array buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* global BigInt */\n\n'use strict';\n\n// MAIN //\n\nvar BigInteger = ( typeof BigInt === 'function' ) ? BigInt : void 0; // eslint-disable-line stdlib/require-globals, node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nexport default BigInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport replace from '@stdlib/string-base-replace';\nimport DTYPES from './dtypes.json';\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of ndarray data types\n*\n* @example\n* var list = dtypes();\n* // returns [...]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable stdlib/empty-line-before-comment */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects. While certain dtypes, such as \"generic\" and \"binary\", have special behavior in JavaScript, they do not have a direct complement in C.\n*\n* @private\n* @returns {Object} object mapping supported dtypes to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `dtypes.h` enumeration!!!!\n\treturn {\n\t\t// Boolean data types:\n\t\t'bool': 0,\n\n\t\t// Integer data types:\n\t\t'int8': 1,\n\t\t'uint8': 2,\n\t\t'uint8c': 3,\n\t\t'int16': 4,\n\t\t'uint16': 5,\n\t\t'int32': 6,\n\t\t'uint32': 7,\n\t\t'int64': 8,\n\t\t'uint64': 9,\n\t\t// 'int128': 10, // uncomment once supported\n\t\t// 'uint128': 11,\n\t\t// 'int256': 12,\n\t\t// 'uint256': 13,\n\n\t\t// Floating-point data types:\n\t\t// 'float16': 14,\n\t\t// 'bfloat16': 15,\n\t\t'float32': 10,\n\t\t'float64': 11,\n\t\t// 'float128': 18, // uncomment once supported\n\n\t\t// Complex floating-point number data types:\n\t\t'complex64': 12,\n\t\t'complex128': 13,\n\n\t\t// Data type for \"binary\" data (i.e., data stored in a Node.js `Buffer` object):\n\t\t'binary': 14,\n\n\t\t// Data type for \"generic\" JavaScript values (objects):\n\t\t'generic': 15,\n\n\t\t// Define a signaling value which is guaranteed not to be a valid type enumeration value:\n\t\t'notype': 17,\n\n\t\t// Indicate the start of user defined type numbers (leaving room for type growth above):\n\t\t'userdefined_type': 256\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumeration;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.keys()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\treturn Object.keys( Object( value ) );\n}\n\n\n// EXPORTS //\n\nexport default keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof Object.keys !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArguments from './main.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment returns the expected internal class of the `arguments` object.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment behaves as expected\n*\n* @example\n* var bool = detect();\n* // returns \n*/\nfunction detect() {\n\treturn isArguments( arguments );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn ( nativeClass( value ) === '[object Arguments]' );\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is `NaN`.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 7.0 );\n* // returns false\n*/\nfunction isnan( x ) {\n\treturn ( x !== x );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `NaN` number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `NaN` number primitive\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a value of `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a value of `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( null );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is `NaN`.\n*\n* @module @stdlib/assert-is-nan\n*\n* @example\n* import isnan from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns false\n*\n* @example\n* import { isObject as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if an object's own property is enumerable.\n*\n* @private\n* @name isEnumerableProperty\n* @type {Function}\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nvar isEnumerableProperty = Object.prototype.propertyIsEnumerable;\n\n\n// EXPORTS //\n\nexport default isEnumerableProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isEnum from './native.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment has a bug where String indices are not detected as \"enumerable\" properties. Observed in Node v0.10.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment has the bug\n*/\nfunction detect() {\n\treturn !isEnum.call( 'beep', '0' );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isString from '@stdlib/assert-is-string';\nimport { isPrimitive as isnan } from '@stdlib/assert-is-nan';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport isEnum from './native.js';\nimport hasStringEnumBug from './has_string_enumerability_bug.js';\n\n\n// MAIN //\n\n/**\n* Tests if an object's own property is enumerable.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nfunction isEnumerableProperty( value, property ) {\n\tvar bool;\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\tbool = isEnum.call( value, property );\n\tif ( !bool && hasStringEnumBug && isString( value ) ) {\n\t\t// Note: we only check for indices, as properties attached to a `String` object are properly detected as enumerable above.\n\t\tproperty = +property;\n\t\treturn (\n\t\t\t!isnan( property ) &&\n\t\t\tisInteger( property ) &&\n\t\t\tproperty >= 0 &&\n\t\t\tproperty < value.length\n\t\t);\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default isEnumerableProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an `arguments` object.\n*\n* @module @stdlib/assert-is-arguments\n*\n* @example\n* import isArguments from '@stdlib/assert-is-arguments';\n*\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* bool = isArguments( [] );\n* // returns false\n*/\n\n// MODULES //\n\nimport hasArgumentsClass from './detect.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar isArguments;\nif ( hasArgumentsClass ) {\n\tisArguments = main;\n} else {\n\tisArguments = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\nimport isArray from '@stdlib/assert-is-array';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-uint32-max';\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object' &&\n\t\t!isArray( value ) &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH &&\n\t\thasOwnProp( value, 'callee' ) &&\n\t\t!isEnumerableProperty( value, 'callee' )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArguments from '@stdlib/assert-is-arguments';\nimport builtin from './builtin.js';\n\n\n// VARIABLES //\n\nvar slice = Array.prototype.slice;\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tif ( isArguments( value ) ) {\n\t\treturn builtin( slice.call( value ) );\n\t}\n\treturn builtin( value );\n}\n\n\n// EXPORTS //\n\nexport default keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\nimport noop from '@stdlib/utils-noop';\n\n\n// MAIN //\n\n// Note: certain environments treat an object's prototype as enumerable, which, as a matter of convention, it shouldn't be...\nvar bool = isEnumerableProperty( noop, 'prototype' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* No operation.\n*\n* @example\n* noop();\n* // ...does nothing.\n*/\nfunction noop() {\n\t// Empty function...\n}\n\n\n// EXPORTS //\n\nexport default noop;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\n\n\n// VARIABLES //\n\nvar obj = {\n\t'toString': null\n};\n\n\n// MAIN //\n\n// Note: certain environments don't allow enumeration of overwritten properties which are considered non-enumerable...\nvar bool = !isEnumerableProperty( obj, 'toString' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isnan from '@stdlib/assert-is-nan';\nimport isCollection from '@stdlib/assert-is-collection';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @param {ArrayLike} arr - array-like object\n* @param {*} searchElement - element to find\n* @param {integer} [fromIndex] - starting index (if negative, the start index is determined relative to last element)\n* @throws {TypeError} must provide an array-like object\n* @throws {TypeError} third argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 3 );\n* // returns 1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 5 );\n* // returns -1\n*\n* @example\n* // Using a `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, 3 );\n* // returns 5\n*\n* @example\n* // `fromIndex` which exceeds `array` length:\n* var arr = [ 1, 2, 3, 4, 2, 5 ];\n* var idx = indexOf( arr, 2, 10 );\n* // returns -1\n*\n* @example\n* // Negative `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6, 2 ];\n* var idx = indexOf( arr, 2, -4 );\n* // returns 5\n*\n* idx = indexOf( arr, 2, -1 );\n* // returns 7\n*\n* @example\n* // Negative `fromIndex` exceeding input `array` length:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, -10 );\n* // returns 1\n*\n* @example\n* // Array-like objects:\n* var str = 'bebop';\n* var idx = indexOf( str, 'o' );\n* // returns 3\n*/\nfunction indexOf( arr, searchElement, fromIndex ) {\n\tvar len;\n\tvar i;\n\tif ( !isCollection( arr ) && !isString( arr ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', arr ) );\n\t}\n\tlen = arr.length;\n\tif ( len === 0 ) {\n\t\treturn -1;\n\t}\n\tif ( arguments.length === 3 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= 0 ) {\n\t\t\tif ( fromIndex >= len ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\ti = fromIndex;\n\t\t} else {\n\t\t\ti = len + fromIndex;\n\t\t\tif ( i < 0 ) {\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\ti = 0;\n\t}\n\t// Check for `NaN`...\n\tif ( isnan( searchElement ) ) {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( isnan( arr[i] ) ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( arr[ i ] === searchElement ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n// EXPORTS //\n\nexport default indexOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests whether a value equals the prototype of its constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction isConstructorPrototype( value ) {\n\treturn ( value.constructor && value.constructor.prototype === value );\n}\n\n\n// EXPORTS //\n\nexport default isConstructorPrototype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar w = ( typeof window === 'undefined' ) ? void 0 : window;\n\n\n// EXPORTS //\n\nexport default w;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport indexOf from '@stdlib/utils-index-of';\nimport typeOf from '@stdlib/utils-type-of';\nimport isConstructorPrototype from './is_constructor_prototype.js';\nimport EXCLUDED_KEYS from './excluded_keys.json';\nimport win from './window.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Determines whether an environment throws when comparing to the prototype of a value's constructor (e.g., [IE9][1]).\n*\n* [1]: https://stackoverflow.com/questions/7688070/why-is-comparing-the-constructor-property-of-two-windows-unreliable\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment is buggy\n*/\nfunction check() {\n\tvar k;\n\tif ( typeOf( win ) === 'undefined' ) {\n\t\treturn false;\n\t}\n\tfor ( k in win ) { // eslint-disable-line guard-for-in\n\t\ttry {\n\t\t\tif (\n\t\t\t\tindexOf( EXCLUDED_KEYS, k ) === -1 &&\n\t\t\t\thasOwnProp( win, k ) &&\n\t\t\t\twin[ k ] !== null &&\n\t\t\t\ttypeOf( win[ k ] ) === 'object'\n\t\t\t) {\n\t\t\t\tisConstructorPrototype( win[ k ] );\n\t\t\t}\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// MAIN //\n\nbool = check();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof window !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasArgumentsBug from './has_arguments_bug.js';\nimport HAS_BUILTIN from './has_builtin.js';\nimport builtin from './builtin.js';\nimport wrapper from './builtin_wrapper.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @name keys\n* @type {Function}\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nvar keys;\nif ( HAS_BUILTIN ) {\n\tif ( hasArgumentsBug() ) {\n\t\tkeys = wrapper;\n\t} else {\n\t\tkeys = builtin;\n\t}\n} else {\n\tkeys = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport keys from './builtin.js';\n\n\n// FUNCTIONS //\n\n/**\n* Tests the built-in `Object.keys()` implementation when provided `arguments`.\n*\n* @private\n* @returns {boolean} boolean indicating whether the built-in implementation returns the expected number of keys\n*/\nfunction test() {\n\treturn ( keys( arguments ) || '' ).length !== 2;\n}\n\n\n// MAIN //\n\n/**\n* Tests whether the built-in `Object.keys()` implementation supports providing `arguments` as an input value.\n*\n* ## Notes\n*\n* - Safari 5.0 does **not** support `arguments` as an input value.\n*\n* @private\n* @returns {boolean} boolean indicating whether a built-in implementation supports `arguments`\n*/\nfunction check() {\n\treturn test( 1, 2 );\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArguments from '@stdlib/assert-is-arguments';\nimport HAS_ENUM_PROTO_BUG from './has_enumerable_prototype_bug.js';\nimport HAS_NON_ENUM_PROPS_BUG from './has_non_enumerable_properties_bug.js';\nimport isConstructorPrototype from './is_constructor_prototype_wrapper.js';\nimport NON_ENUMERABLE from './non_enumerable.json';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tvar skipConstructor;\n\tvar skipPrototype;\n\tvar isFcn;\n\tvar out;\n\tvar k;\n\tvar p;\n\tvar i;\n\n\tout = [];\n\tif ( isArguments( value ) ) {\n\t\t// Account for environments which treat `arguments` differently...\n\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\tout.push( i.toString() );\n\t\t}\n\t\t// Note: yes, we are precluding the `arguments` array-like object from having other enumerable properties; however, this should (1) be very rare and (2) not be encouraged (e.g., doing something like `arguments.a = 'b'`; in certain engines directly manipulating the `arguments` value results in automatic de-optimization).\n\t\treturn out;\n\t}\n\tif ( typeof value === 'string' ) {\n\t\t// Account for environments which do not treat string character indices as \"own\" properties...\n\t\tif ( value.length > 0 && !hasOwnProp( value, '0' ) ) {\n\t\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\t\tout.push( i.toString() );\n\t\t\t}\n\t\t}\n\t} else {\n\t\tisFcn = ( typeof value === 'function' );\n\t\tif ( isFcn === false && !isObjectLike( value ) ) {\n\t\t\treturn out;\n\t\t}\n\t\tskipPrototype = ( HAS_ENUM_PROTO_BUG && isFcn );\n\t}\n\tfor ( k in value ) {\n\t\tif ( !( skipPrototype && k === 'prototype' ) && hasOwnProp( value, k ) ) {\n\t\t\tout.push( String( k ) );\n\t\t}\n\t}\n\tif ( HAS_NON_ENUM_PROPS_BUG ) {\n\t\tskipConstructor = isConstructorPrototype( value );\n\t\tfor ( i = 0; i < NON_ENUMERABLE.length; i++ ) {\n\t\t\tp = NON_ENUMERABLE[ i ];\n\t\t\tif ( !( skipConstructor && p === 'constructor' ) && hasOwnProp( value, p ) ) {\n\t\t\t\tout.push( String( p ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasAutomationEqualityBug from './has_automation_equality_bug.js';\nimport isConstructorPrototype from './is_constructor_prototype.js';\nimport HAS_WINDOW from './has_window.js';\n\n\n// MAIN //\n\n/**\n* Wraps the test for constructor prototype equality to accommodate buggy environments (e.g., environments which throw when testing equality).\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction wrapper( value ) {\n\tif ( HAS_WINDOW === false && !hasAutomationEqualityBug ) {\n\t\treturn isConstructorPrototype( value );\n\t}\n\ttry {\n\t\treturn isConstructorPrototype( value );\n\t} catch ( error ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default wrapper;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types.\n*\n* @module @stdlib/ndarray-dtypes\n*\n* @example\n* import dtypes from '@stdlib/ndarray-dtypes';\n*\n* var list = dtypes();\n* // returns [...]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\nimport objectKeys from '@stdlib/utils-keys';\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ORDERS from './orders.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray orders.\n*\n* @returns {StringArray} list of ndarray orders\n*\n* @example\n* var list = orders();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\nfunction orders() {\n\treturn ORDERS.slice();\n}\n\n\n// EXPORTS //\n\nexport default orders;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported layouts to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 101`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of array objects.\n*\n* @returns {Object} object mapping supported layouts to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `layouts.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': 101,\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': 102\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of BLAS memory layouts.\n*\n* @module @stdlib/blas-base-layouts\n*\n* @example\n* import layouts from '@stdlib/blas-base-layouts';\n*\n* var list = layouts();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport DATA from './data.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of BLAS memory layouts.\n*\n* @returns {StringArray} list of memory layouts\n*\n* @example\n* var list = layouts();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\nfunction layouts() {\n\treturn DATA.slice();\n}\n\n\n// EXPORTS //\n\nexport default layouts;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { enum as layouts } from '@stdlib/blas-base-layouts';\n\n\n// VARIABLES //\n\nvar LAYOUTS = layouts();\n\n\n// MAIN //\n\n/**\n* Returns an object mapping supported orders to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported orders to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `orders.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': LAYOUTS[ 'row-major' ],\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': LAYOUTS[ 'column-major' ]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray orders.\n*\n* @module @stdlib/ndarray-orders\n*\n* @example\n* import orders from '@stdlib/ndarray-orders';\n*\n* var list = orders();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport MODES from './modes.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray index modes.\n*\n* @returns {StringArray} list of ndarray index modes\n*\n* @example\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nexport default modes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported index modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `throw == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported index modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `index_modes.h` enumeration!!!!\n\treturn {\n\t\t'throw': 1,\n\t\t'clamp': 2,\n\t\t'wrap': 3,\n\t\t'normalize': 4\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray index modes.\n*\n* @module @stdlib/ndarray-index-modes\n*\n* @example\n* import modes from '@stdlib/ndarray-index-modes';\n*\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport modes from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default modes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport DataView from '@stdlib/array-dataview';\nimport BigInt from '@stdlib/bigint-ctor';\nimport { enum as dtypes } from '@stdlib/ndarray-dtypes';\nimport { enum as orders } from '@stdlib/ndarray-orders';\nimport { enum as modes } from '@stdlib/ndarray-index-modes';\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tv.setBigInt64( o, BigInt( N ), IS_LITTLE_ENDIAN );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv.setBigInt64( o, BigInt( sh[i] ), IS_LITTLE_ENDIAN );\n\t\tv.setBigInt64( o+s, BigInt( st[i]*nbytes ), IS_LITTLE_ENDIAN );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tv.setBigInt64( o, BigInt( this._offset*nbytes ), IS_LITTLE_ENDIAN );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tv.setBigInt64( o, BigInt( M ), IS_LITTLE_ENDIAN );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default meta2dataview;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport Uint8Array from '@stdlib/array-uint8';\nimport DataView from '@stdlib/array-dataview';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\n// 0xFFFFFFFF = 2**32 - 1 => 11111111 11111111 11111111 11111111\nvar LOW_MASK = 0xFFFFFFFF >>> 0;\n\n// 2**32\nvar TWO_32 = 4294967296;\n\n// Byte array workspace:\nvar BYTES = new Uint8Array( 8 );\nvar VIEW = new DataView( BYTES.buffer );\n\n\n// MAIN //\n\n/**\n* Converts an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* ## Notes\n*\n* - This function assumes that the input value is less than the maximum safe double-precision floating-point integer plus one (i.e., `2**53`).\n*\n* @param {number} x - input value\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var out = new Uint8Array( 8 );\n* var bytes = float64ToInt64Bytes( 1.0, out, 1, 0 );\n* // returns \n*/\nfunction float64ToInt64Bytes( x, out, stride, offset ) {\n\tvar hi;\n\tvar lo;\n\tvar i;\n\n\tif ( x === 0 ) {\n\t\tfor ( i = 0; i < BYTES.length; i++ ) {\n\t\t\tout[ offset ] = 0;\n\t\t\toffset += stride;\n\t\t}\n\t\treturn out;\n\t}\n\t// Get the low 32-bit word:\n\tlo = (x&LOW_MASK)>>>0;\n\n\t// Get the high 32-bit word:\n\thi = floor( x/TWO_32 );\n\n\t// Insert the high and low words according to host byte order (endianness):\n\tif ( IS_LITTLE_ENDIAN ) {\n\t\tVIEW.setUint32( 0, lo, IS_LITTLE_ENDIAN );\n\t\tVIEW.setUint32( 4, hi, IS_LITTLE_ENDIAN );\n\t} else {\n\t\tVIEW.setUint32( 0, hi, IS_LITTLE_ENDIAN );\n\t\tVIEW.setUint32( 4, lo, IS_LITTLE_ENDIAN );\n\t}\n\tfor ( i = 0; i < BYTES.length; i++ ) {\n\t\tout[ offset ] = BYTES[ i ];\n\t\toffset += stride;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default float64ToInt64Bytes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* @module @stdlib/number-float64-base-to-int64-bytes\n*\n* @example\n* import float64ToInt64Bytes from '@stdlib/number-float64-base-to-int64-bytes';\n*\n* var bytes = float64ToInt64Bytes( 1.0 );\n* // returns \n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n* import float64ToInt64Bytes from '@stdlib/number-float64-base-to-int64-bytes';\n*\n* var out = new Uint8Array( 8 );\n* var bytes = float64ToInt64Bytes( 1.0, out, 1, 0 );\n* // returns \n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport Uint8Array from '@stdlib/array-uint8';\nimport DataView from '@stdlib/array-dataview';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\n// 0xFFFFFFFF = 2**32 - 1 => 11111111 11111111 11111111 11111111\nvar LOW_MASK = 0xFFFFFFFF >>> 0;\n\n// 2**32\nvar TWO_32 = 4294967296;\n\n\n// MAIN //\n\n/**\n* Converts an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* ## Notes\n*\n* - This function assumes that the input value is less than the maximum safe double-precision floating-point integer plus one (i.e., `2**53`).\n*\n* @param {number} x - input value\n* @returns {Uint8Array} byte array\n*\n* @example\n* var bytes = float64ToInt64Bytes( 1.0 );\n* // returns \n*/\nfunction float64ToInt64Bytes( x ) {\n\tvar bytes;\n\tvar view;\n\tvar hi;\n\tvar lo;\n\n\tbytes = new Uint8Array( 8 );\n\tif ( x === 0 ) {\n\t\treturn bytes;\n\t}\n\t// Get the low 32-bit word:\n\tlo = (x&LOW_MASK)>>>0;\n\n\t// Get the high 32-bit word:\n\thi = floor( x/TWO_32 );\n\n\t// Insert the high and low words according to host byte order (endianness):\n\tview = new DataView( bytes.buffer );\n\tif ( IS_LITTLE_ENDIAN ) {\n\t\tview.setUint32( 0, lo, IS_LITTLE_ENDIAN );\n\t\tview.setUint32( 4, hi, IS_LITTLE_ENDIAN );\n\t} else {\n\t\tview.setUint32( 0, hi, IS_LITTLE_ENDIAN );\n\t\tview.setUint32( 4, lo, IS_LITTLE_ENDIAN );\n\t}\n\treturn bytes;\n}\n\n\n// EXPORTS //\n\nexport default float64ToInt64Bytes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport DataView from '@stdlib/array-dataview';\nimport Uint8Array from '@stdlib/array-uint8';\nimport { enum as dtypes } from '@stdlib/ndarray-dtypes';\nimport { enum as orders } from '@stdlib/ndarray-orders';\nimport { enum as modes } from '@stdlib/ndarray-index-modes';\nimport { assign as float64ToInt64Bytes } from '@stdlib/number-float64-base-to-int64-bytes';\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar bytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create views for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\tbytes = new Uint8Array( v.buffer );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tfloat64ToInt64Bytes( N, bytes, 1, o );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tfloat64ToInt64Bytes( sh[i], bytes, 1, o );\n\t\tfloat64ToInt64Bytes( st[i]*nbytes, bytes, 1, o+s );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tfloat64ToInt64Bytes( this._offset*nbytes, bytes, 1, o );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tfloat64ToInt64Bytes( M, bytes, 1, o );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default meta2dataview;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport hasBigIntSupport from '@stdlib/assert-has-bigint-support';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport strides2order from '@stdlib/ndarray-base-strides2order';\nimport Boolean from '@stdlib/boolean-ctor';\nimport isColumnMajorContiguous from './is_column_major_contiguous.js';\nimport isRowMajorContiguous from './is_row_major_contiguous.js';\nimport isContiguous from './is_contiguous.js';\nimport copyFlags from './copy_flags.js';\nimport igetValue from './iget.js';\nimport isetValue from './iset.js';\nimport setValue from './set.js';\nimport getValue from './get.js';\nimport toJSON from './tojson.js';\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\nimport meta2dataview from './meta2dataview.js';\nimport meta2dataviewPolyfill from './meta2dataview.polyfill.js';\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* ## Notes\n*\n* - To create a zero-dimensional array,\n*\n* ```javascript\n* var buffer = [ 1 ];\n* var shape = [];\n* var strides = [ 0 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* ```\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order ) {\n\tvar contiguous;\n\tvar nbytes;\n\tvar ord;\n\tvar len;\n\tvar i;\n\tif ( !(this instanceof ndarray) ) {\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t}\n\t// Compute the number of elements...\n\tlen = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\t// Compute the number of bytes...\n\tif ( buffer.BYTES_PER_ELEMENT ) {\n\t\tnbytes = buffer.BYTES_PER_ELEMENT * len;\n\t} else {\n\t\tnbytes = null;\n\t}\n\t// Set private properties...\n\tthis._byteLength = nbytes;\n\tthis._bytesPerElement = bytesPerElement( dtype );\n\tthis._buffer = buffer;\n\tthis._dtype = dtype;\n\tthis._length = len;\n\tthis._ndims = shape.length;\n\tthis._offset = offset;\n\tthis._order = order;\n\tthis._shape = shape;\n\tthis._strides = strides;\n\tthis._accessors = Boolean( buffer.get && buffer.set );\n\n\tthis._iterationOrder = iterationOrder( strides );\n\n\t// Determine if the array can be stored contiguously:\n\tcontiguous = isContiguous( len, shape, strides, offset, this._iterationOrder ); // eslint-disable-line max-len\n\n\t// Infer the array \"order\" from the stride array (this is supplementary to the `order` parameter):\n\tord = strides2order( strides );\n\n\tthis._flags = {\n\t\t'ROW_MAJOR_CONTIGUOUS': isRowMajorContiguous( ord, contiguous ),\n\t\t'COLUMN_MAJOR_CONTIGUOUS': isColumnMajorContiguous( ord, contiguous ),\n\t\t'READONLY': false\n\t};\n\n\t// Initialize a property for caching serialized meta data:\n\tthis.__meta_dataview__ = null;\n\n\treturn this;\n}\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Size (in bytes) of the array (if known).\n*\n* @name byteLength\n* @memberof ndarray.prototype\n* @type {(NonNegativeInteger|null)}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var byteLength = x.byteLength;\n* // returns 48\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'byteLength', function get() {\n\treturn this._byteLength;\n});\n\n/**\n* Size (in bytes) of each array element (if known).\n*\n* @name BYTES_PER_ELEMENT\n* @memberof ndarray.prototype\n* @type {(PositiveInteger|null)}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var nbytes = x.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'BYTES_PER_ELEMENT', function get() {\n\treturn this._bytesPerElement;\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name data\n* @memberof ndarray.prototype\n* @type {(Array|TypedArray|Buffer)}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var data = x.data;\n* // returns [ 1, 2, 3, 4, 5, 6 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'data', function get() {\n\treturn this._buffer;\n});\n\n/**\n* Underlying data type.\n*\n* @name dtype\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dtype = x.dtype;\n* // returns 'generic'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'dtype', function get() {\n\treturn this._dtype;\n});\n\n/**\n* Meta information, such as information concerning the memory layout of the array.\n*\n* @name flags\n* @memberof ndarray.prototype\n* @type {Object}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var flgs = x.flags;\n* // returns \n*/\nsetReadOnlyAccessor( ndarray.prototype, 'flags', function get() {\n\treturn copyFlags( this._flags );\n});\n\n/**\n* Length of the array.\n*\n* @name length\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var len = x.length;\n* // returns 6\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Number of dimensions.\n*\n* @name ndims\n* @memberof ndarray.prototype\n* @type {PositiveInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var ndims = x.ndims;\n* // returns 2\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'ndims', function get() {\n\treturn this._ndims;\n});\n\n/**\n* Index offset which specifies the buffer index at which to start iterating over array elements.\n*\n* @name offset\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.offset;\n* // returns 0\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'offset', function get() {\n\treturn this._offset;\n});\n\n/**\n* Array order.\n*\n* ## Notes\n*\n* - The array order is either row-major (C-style) or column-major (Fortran-style).\n*\n* @name order\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var order = x.order;\n* // returns 'row-major'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'order', function get() {\n\treturn this._order;\n});\n\n/**\n* Shape of the array.\n*\n* @name shape\n* @memberof ndarray.prototype\n* @type {NonNegativeIntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.shape;\n* // returns [ 3, 2 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'shape', function get() {\n\treturn this._shape.slice();\n});\n\n/**\n* Index strides which specify how to access data along corresponding array dimensions.\n*\n* @name strides\n* @memberof ndarray.prototype\n* @type {IntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.strides;\n* // returns [ 2, 1 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'strides', function get() {\n\treturn this._strides.slice();\n});\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', getValue );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', igetValue );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', setValue );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', isetValue );\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toString\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {string} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var str = x.toString();\n* // returns \"ndarray( 'generic', [ 3, 4, 5, 6, 7, 8 ], [ 3, 2 ], [ 2, 1 ], 0, 'row-major' )\"\n*/\nsetReadOnly( ndarray.prototype, 'toString', toString );\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying an `ndarray` instance.\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toJSON\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {Object} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.toJSON();\n* // e.g., returns { 'type': 'ndarray', 'dtype': 'generic', 'flags': {...}, 'offset': 0, 'order': 'row-major', 'shape': [ 3, 2 ], 'strides': [ 2, 1 ], 'data': [ 3, 4, 5, 6, 7, 8 ] }\n*/\nsetReadOnly( ndarray.prototype, 'toJSON', toJSON );\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - Meta data format:\n*\n* ```text\n* | (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Consumers of this method should treat the returned `DataView` as **immutable**. Otherwise, mutation can invalidate meta data and potentially affect other consumers.\n*\n* @private\n* @name __array_meta_dataview__\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {DataView} serialized meta data\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dv = x.__array_meta_dataview__();\n* // returns \n*/\nsetReadOnly( ndarray.prototype, '__array_meta_dataview__', ( hasBigIntSupport() ) ? meta2dataview : meta2dataviewPolyfill );\n\n\n// EXPORTS //\n\nexport default ndarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n\n\n// MAIN //\n\n/**\n* Determines if an array is contiguous.\n*\n* @private\n* @param {NonNegativeInteger} len - array length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {integer} iterationOrder - iteration order\n* @returns {boolean} boolean indicating if an array is contiguous\n*/\nfunction isContiguous( len, shape, strides, offset, iterationOrder ) {\n\tvar buf;\n\n\t// If an array does not contain any elements, then no data to store, and, if the array is unordered, adjacent array elements are not guaranteed to be stored next to each other.\n\tif ( len === 0 || iterationOrder === 0 ) {\n\t\treturn false;\n\t}\n\t// Ensure that the array is compatible with a single memory segment:\n\tbuf = minmaxViewBufferIndex( shape, strides, offset );\n\treturn ( len === ( buf[1]-buf[0]+1 ) );\n}\n\n\n// EXPORTS //\n\nexport default isContiguous;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ndarray from '@stdlib/ndarray-base-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is ndarray-like.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating if a value is ndarray-like\n*\n* @example\n* import ndarray from '@stdlib/ndarray-ctor';\n*\n* var arr = ndarray( 'generic', [ 0, 0, 0, 0 ], [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );\n*\n* var bool = isndarrayLike( arr );\n* // returns true\n*\n* bool = isndarrayLike( [] );\n* // returns false\n*/\nfunction isndarrayLike( v ) {\n\treturn (\n\t\tv instanceof ndarray ||\n\t\t(\n\t\t\tv !== null &&\n\t\t\ttypeof v === 'object' &&\n\t\t\ttypeof v.data === 'object' &&\n\t\t\ttypeof v.shape === 'object' &&\n\t\t\ttypeof v.strides === 'object' &&\n\t\t\ttypeof v.offset === 'number' &&\n\t\t\ttypeof v.order === 'string' &&\n\t\t\ttypeof v.ndims === 'number' &&\n\t\t\ttypeof v.dtype === 'string' &&\n\t\t\ttypeof v.length === 'number' &&\n\t\t\ttypeof v.flags === 'object' &&\n\t\t\ttypeof v.get === 'function' &&\n\t\t\ttypeof v.set === 'function'\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isndarrayLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies ndarray flags.\n*\n* @private\n* @param {Object} flags - flags\n* @returns {Object} copy of input object\n*/\nfunction copyFlags( flags ) {\n\treturn {\n\t\t'ROW_MAJOR_CONTIGUOUS': flags.ROW_MAJOR_CONTIGUOUS,\n\t\t'COLUMN_MAJOR_CONTIGUOUS': flags.COLUMN_MAJOR_CONTIGUOUS,\n\t\t'READONLY': flags.READONLY\n\t};\n}\n\n\n// EXPORTS //\n\nexport default copyFlags;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} idx - indices\n* @returns {*} array element\n*/\nfunction get() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( this._offset );\n\t\t}\n\t\treturn this._buffer[ this._offset ];\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this._offset+idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset+idx ];\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this.offset-idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset-idx ];\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( ind );\n\t\t}\n\t\treturn this._buffer[ ind ];\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( ind );\n\t}\n\treturn this._buffer[ ind ];\n}\n\n\n// EXPORTS //\n\nexport default iget;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default set;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( idx, this._offset );\n\t\t} else {\n\t\t\tthis._buffer[ this._offset ] = idx;\n\t\t}\n\t\treturn this;\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset+idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset+idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset-idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset-idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( v, ind );\n\t\t} else {\n\t\t\tthis._buffer[ ind ] = v;\n\t\t}\n\t\treturn this;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( v, ind );\n\t} else {\n\t\tthis._buffer[ ind ] = v;\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default iset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport real from '@stdlib/complex-float64-real';\nimport imag from '@stdlib/complex-float64-imag';\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tlen = this._length;\n\n\t// Build an object containing all ndarray properties needed to revive a serialized ndarray...\n\tout = {};\n\tout.type = 'ndarray';\n\tout.dtype = this.dtype;\n\tout.flags = {\n\t\t'READONLY': this._flags.READONLY\n\t};\n\tout.order = this._order;\n\tout.shape = this._shape.slice();\n\tout.strides = this._strides.slice();\n\n\t// Flip the signs of negative strides:\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( out.strides[ i ] < 0 ) {\n\t\t\tout.strides[ i ] *= -1;\n\t\t}\n\t}\n\t// Cast data to generic array...\n\tout.data = [];\n\tif ( out.dtype === 'complex64' || out.dtype === 'complex128' ) {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tv = this.iget( i );\n\t\t\tout.data.push( real( v ), imag( v ) );\n\t\t}\n\t} else {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout.data.push( this.iget( i ) );\n\t\t}\n\t}\n\treturn out;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar TYPE = 'function';\n\n\n// MAIN //\n\n/**\n* Tests if an array-like object supports the accessor (get/set) protocol.\n*\n* @param {Object} value - value to test\n* @returns {boolean} boolean indicating whether a value is an accessor array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isAccessorArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isAccessorArray( [] );\n* // returns false\n*/\nfunction isAccessorArray( value ) {\n\treturn ( typeof value.get === TYPE && typeof value.set === TYPE ); // eslint-disable-line valid-typeof\n}\n\n\n// EXPORTS //\n\nexport default isAccessorArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar SETTERS = {\n\t'complex128': setComplex128,\n\t'complex64': setComplex64,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex128( arr, 1, new Complex128( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 11.0\n*/\nfunction setComplex128( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex64( arr, 1, new Complex64( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setComplex64( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* setArrayLike( arr, 2, 10 );\n*\n* var v = arr[ 2 ];\n* // returns 10\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 1, new Complex64( 10.0, 11.0 ) );\n*\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar SETTERS = {\n\t'float64': setFloat64,\n\t'float32': setFloat32,\n\t'int32': setInt32,\n\t'int16': setInt16,\n\t'int8': setInt8,\n\t'uint32': setUint32,\n\t'uint16': setUint16,\n\t'uint8': setUint8,\n\t'uint8c': setUint8c,\n\t'generic': setGeneric,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( 4 );\n*\n* setFloat64( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat64( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( 4 );\n*\n* setFloat32( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( 4 );\n*\n* setInt32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( 4 );\n*\n* setInt16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( 4 );\n*\n* setInt8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( 4 );\n*\n* setUint32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( 4 );\n*\n* setUint16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( 4 );\n*\n* setUint8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( 4 );\n*\n* setUint8c( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8c( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setGeneric( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setGeneric( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setArrayLike( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of elements in an array.\n*\n* @param {(NonNegativeIntegerArray|EmptyArray)} shape - array shape\n* @returns {NonNegativeInteger} number of elements\n*\n* @example\n* var n = numel( [ 3, 3, 3 ] );\n* // returns 27\n*/\nfunction numel( shape ) {\n\tvar ndims;\n\tvar n;\n\tvar i;\n\n\tndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0;\n\t}\n\tn = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tn *= shape[ i ];\n\t}\n\treturn n;\n}\n\n\n// EXPORTS //\n\nexport default numel;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {string} data type\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\treturn x.dtype;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies the elements of an indexed array-like object to a new \"generic\" array.\n*\n* @param {Collection} x - input array\n* @returns {Array} output array\n*\n* @example\n* var out = copy( [ 1, 2, 3 ] );\n* // returns [ 1, 2, 3 ]\n*/\nfunction copy( x ) {\n\tvar out;\n\tvar len;\n\tvar i;\n\n\tlen = x.length;\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( x[ i ] ); // use `Array#push` to ensure \"fast\" elements\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default copy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport copyIndexed from '@stdlib/array-base-copy-indexed';\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `shape` property\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x, copy ) {\n\tvar sh = x.shape;\n\tif ( copy ) {\n\t\treturn copyIndexed( sh );\n\t}\n\treturn sh;\n}\n\n\n// EXPORTS //\n\nexport default shape;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction rowmajor( shape ) {\n\tvar ndims;\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tout = [];\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tout.push( 0 );\n\t}\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction columnmajor( shape ) {\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tout = [];\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout.push( s );\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {Array} array strides\n*\n* @example\n* var s = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* s = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape );\n\t}\n\treturn rowmajor( shape );\n}\n\n\n// EXPORTS //\n\nexport default shape2strides;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Generate a stride array from an array shape.\n*\n* @module @stdlib/ndarray-base-shape2strides\n*\n* @example\n* import shape2strides from '@stdlib/ndarray-base-shape2strides';\n*\n* var strides = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* strides = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction rowmajor( shape, out ) {\n\tvar ndims;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction columnmajor( shape, out ) {\n\tvar s;\n\tvar i;\n\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*\n* @example\n* var strides = [ 0, 0 ];\n*\n* var out = shape2strides( [ 3, 2 ], 'row-major', strides );\n* // returns [ 2, 1 ]\n*\n* var bool = ( out === strides );\n* // returns true\n*\n* out = shape2strides( [ 3, 2 ], 'column-major', strides );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order, out ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape, out );\n\t}\n\treturn rowmajor( shape, out );\n}\n\n\n// EXPORTS //\n\nexport default shape2strides;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport copyIndexed from '@stdlib/array-base-copy-indexed';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `strides` property\n* @returns {IntegerArray} strides\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x, copy ) {\n\tvar ord;\n\tvar sh;\n\tvar st;\n\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\tsh = x.shape;\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( typeof ord !== 'string' ) {\n\t\t\tord = ROW_MAJOR;\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\tif ( copy ) {\n\t\treturn copyIndexed( st );\n\t}\n\treturn st;\n}\n\n\n// EXPORTS //\n\nexport default strides;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @returns {NonNegativeInteger} offset - offset\n*\n* @example\n* var shape = [ 2, 3, 10 ];\n* var strides = [ 30, -10, 1 ];\n*\n* var offset = strides2offset( shape, strides );\n* // returns 20\n*/\nfunction strides2offset( shape, strides ) {\n\tvar offset;\n\tvar ndims;\n\tvar i;\n\n\tndims = shape.length;\n\toffset = 0;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\t// Note that, since the stride is negative, this operation increments, not decrements, the offset...\n\t\t\toffset -= strides[ i ] * ( shape[ i ]-1 );\n\t\t}\n\t}\n\treturn offset;\n}\n\n\n// EXPORTS //\n\nexport default strides2offset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2offset from '@stdlib/ndarray-base-strides2offset';\n\n\n// MAIN //\n\n/**\n* Returns the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {NonNegativeInteger} index offset\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\nfunction offset( x ) {\n\tvar st;\n\tvar sh;\n\tvar o;\n\n\to = x.offset;\n\tif ( typeof o === 'number' ) {\n\t\treturn o;\n\t}\n\tsh = x.shape;\n\tif ( sh.length === 0 ) {\n\t\treturn 0;\n\t}\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn 0;\n\t}\n\treturn strides2offset( sh, st );\n}\n\n\n// EXPORTS //\n\nexport default offset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\to = x.order;\n\tif ( typeof o === 'string' ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn ROW_MAJOR; // WARNING: default to row-major for ndarray-like objects lacking strides. This may or may not be accurate, and we're defaulting to row-major here based on the belief that row-major is more likely given that, e.g., JavaScript arrays are similar to C arrays (i.e., stored in row-major order).\n\t}\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( x.shape.length === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default order;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the underlying data buffer of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {Collection} underlying data buffer\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\nfunction data( x ) {\n\treturn x.data;\n}\n\n\n// EXPORTS //\n\nexport default data;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport numel from '@stdlib/ndarray-base-numel';\nimport getDType from '@stdlib/ndarray-base-dtype';\nimport getShape from '@stdlib/ndarray-base-shape';\nimport getStrides from '@stdlib/ndarray-base-strides';\nimport getOffset from '@stdlib/ndarray-base-offset';\nimport getOrder from '@stdlib/ndarray-base-order';\nimport getData from '@stdlib/ndarray-base-data-buffer';\n\n\n// MAIN //\n\n/**\n* Converts an ndarray-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding ndarray meta data to ensure that internal functions operating on ndarrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **ref**: reference to the original ndarray-like object.\n* - **dtype**: underlying data type.\n* - **data**: data buffer.\n* - **length**: number of elements.\n* - **shape**: array dimensions.\n* - **strides**: array strides.\n* - **offset**: index offset.\n* - **order**: order.\n* - **accessorProtocol**: `boolean` indicating whether the data buffer supports the get/set protocol (i.e., uses accessors for getting and setting elements).\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an ndarray element and whose second element is an accessor for setting an ndarray element.\n*\n* @param {ndarrayLike} x - ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {Object} object containing ndarray meta data\n*\n* @example\n* import array from '@stdlib/ndarray-array';\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n*\n* var obj = ndarraylike2object( x );\n* // returns {...}\n*/\nfunction ndarraylike2object( x ) {\n\tvar xbuf;\n\tvar bool;\n\tvar sh;\n\tvar dt;\n\n\txbuf = getData( x );\n\tsh = getShape( x, true );\n\tdt = getDType( x );\n\n\tbool = isAccessorArray( xbuf );\n\n\treturn {\n\t\t'ref': x,\n\t\t'dtype': dt,\n\t\t'data': xbuf,\n\t\t'length': numel( sh ),\n\t\t'shape': sh,\n\t\t'strides': getStrides( x, true ),\n\t\t'offset': getOffset( x ),\n\t\t'order': getOrder( x ),\n\t\t'accessorProtocol': bool,\n\t\t'accessors': ( bool ) ?\n\t\t\t[ accessorGetter( dt ), accessorSetter( dt ) ] :\n\t\t\t[ getter( dt ), setter( dt ) ]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default ndarraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Normalizes an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {integer} index\n*\n* @example\n* var idx = normalizeIndex( -2, 10 );\n* // returns 9\n*\n* idx = normalizeIndex( 15, 10 );\n* // returns -1\n*\n* idx = normalizeIndex( 5, 10 );\n* // returns 5\n*/\nfunction normalizeIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\tidx += max + 1;\n\t\tif ( idx < 0 ) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\treturn -1;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default normalizeIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\n\n\n// MAIN //\n\n/**\n* Returns a list of unique indices after normalizing to the interval `[0,max]`.\n*\n* @param {IntegerArray} indices - indices\n* @param {NonNegativeInteger} max - maximum index\n* @returns {(IntegerArray|null)} normalized indices\n*\n* @example\n* var idx = toUniqueNormalizedIndices( [ -2, 5 ], 10 );\n* // returns [ 9, 5 ]\n*\n* idx = toUniqueNormalizedIndices( [ 15 ], 10 );\n* // returns null\n*/\nfunction toUniqueNormalizedIndices( indices, max ) {\n\tvar hash;\n\tvar out;\n\tvar idx;\n\tvar i;\n\n\thash = {};\n\tout = [];\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\tidx = normalizeIndex( indices[ i ], max );\n\t\tif ( idx < 0 ) {\n\t\t\treturn null;\n\t\t}\n\t\tif ( hash[ idx ] === void 0 ) {\n\t\t\thash[ idx ] = true;\n\t\t\tout.push( idx );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toUniqueNormalizedIndices;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the complement of a list of array indices.\n*\n* @param {NonNegativeInteger} N - array length\n* @param {NonNegativeIntegerArray} indices - list of indices\n* @returns {NonNegativeIntegerArray} indices complement\n*\n* @example\n* var idx = indicesComplement( 5, [ 1, 2 ] );\n* // returns [ 0, 3, 4 ]\n*/\nfunction indicesComplement( N, indices ) {\n\tvar hash;\n\tvar out;\n\tvar i;\n\n\thash = {};\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\thash[ indices[ i ] ] = true;\n\t}\n\tout = [];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( hash[ i ] === void 0 ) {\n\t\t\tout.push( i );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default indicesComplement;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Takes elements from two indexed arrays in a single pass.\n*\n* @param {Collection} x - first input array\n* @param {Collection} y - second input array\n* @param {NonNegativeIntegerArray} indices - list of indices\n* @returns {Array} output arrays\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n* var y = [ 5, 6, 7, 8 ];\n* var indices = [ 3, 1, 2, 0 ];\n*\n* var out = take2( x, y, indices );\n* // returns [ [ 4, 2, 3, 1 ], [ 8, 6, 7, 5 ] ]\n*/\nfunction take2( x, y, indices ) {\n\tvar o1;\n\tvar o2;\n\tvar i;\n\n\to1 = [];\n\to2 = [];\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\to1.push( x[ indices[ i ] ] ); // use `Array#push` to ensure \"fast\" elements\n\t\to2.push( y[ indices[ i ] ] );\n\t}\n\treturn [ o1, o2 ];\n}\n\n\n// EXPORTS //\n\nexport default take2;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128'\n};\n\n\n// EXPORTS //\n\nexport default ctor2dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64-ctor';\nimport Complex64 from '@stdlib/complex-float32-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array\n];\n\n\n// EXPORTS //\n\nexport default CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128'\n];\n\n\n// EXPORTS //\n\nexport default DTYPES;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './dtypes.js';\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport dtype from '@stdlib/array-dtype';\n\n\n// MAIN //\n\n/**\n* Converts an array-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding array meta data to ensure that internal functions operating on arrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **data**: reference to the input array.\n* - **dtype**: array data type.\n* - **accessorProtocol**: `boolean` indicating whether the input array uses accessors for getting and setting elements.\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an array element and whose second element is an accessor for setting an array element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing array meta data\n*\n* @example\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\nfunction arraylike2object( x ) {\n\tvar dt = dtype( x );\n\tif ( isAccessorArray( x ) ) {\n\t\treturn {\n\t\t\t'data': x,\n\t\t\t'dtype': dt,\n\t\t\t'accessorProtocol': true,\n\t\t\t'accessors': [\n\t\t\t\taccessorGetter( dt ),\n\t\t\t\taccessorSetter( dt )\n\t\t\t]\n\t\t};\n\t}\n\treturn {\n\t\t'data': x,\n\t\t'dtype': dt,\n\t\t'accessorProtocol': false,\n\t\t'accessors': [\n\t\t\tgetter( dt ),\n\t\t\tsetter( dt )\n\t\t]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is `undefined` or `null`.\n*\n* ## Notes\n*\n* - In older browsers, `undefined` is a global which can be overridden. `void`, however, is an operator which **cannot** be overridden. Consequently, better to use `void` to check for `undefined`. See [Stack Overflow][1].\n*\n* [1]: http://stackoverflow.com/a/19369078/2225624\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is undefined\n*\n* @example\n* var bool = isUndefinedOrNull( undefined );\n* // returns true\n*\n* bool = isUndefinedOrNull( null );\n* // returns true\n*\n* bool = isUndefinedOrNull( false );\n* // returns false\n*/\nfunction isUndefinedOrNull( value ) {\n\treturn ( value === void 0 || value === null );\n}\n\n\n// EXPORTS //\n\nexport default isUndefinedOrNull;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport isUndefinedOrNull from '@stdlib/assert-is-undefined-or-null';\n\n\n// FUNCTIONS //\n\n/**\n* Tests whether an object has a specified method.\n*\n* @private\n* @param {Object} obj - input object\n* @param {string} method - method name\n* @returns {boolean} boolean indicating whether an object has a specified method\n*\n* @example\n* var bool = hasMethod( [], 'join' );\n* // returns true\n*\n* @example\n* var bool = hasMethod( [], 'beep' );\n* // returns false\n*/\nfunction hasMethod( obj, method ) {\n\treturn ( typeof obj[ method ] === 'function' );\n}\n\n/**\n* Returns a string created by joining elements in an accessor array using a specified separator.\n*\n* @private\n* @param {Object} x - input array object\n* @param {integer} separator - separator\n* @returns {string} output string\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n*\n* var x = arraylike2object( toAccessorArray( [ 1, 2, 3, 4 ] ) );\n*\n* var out = accessors( x, ',' );\n* // returns '1,2,3,4'\n*/\nfunction accessors( x, separator ) {\n\tvar data;\n\tvar out;\n\tvar get;\n\tvar N;\n\tvar v;\n\tvar i;\n\n\tdata = x.data;\n\tget = x.accessors[ 0 ];\n\n\tN = data.length - 1;\n\tout = '';\n\tfor ( i = 0; i <= N; i++ ) {\n\t\tv = get( data, i );\n\t\tif ( !isUndefinedOrNull( v ) ) {\n\t\t\tout += String( v );\n\t\t}\n\t\tif ( i < N ) {\n\t\t\tout += separator;\n\t\t}\n\t}\n\treturn out;\n}\n\n/**\n* Returns a string created by manually joining array elements using a specified separator.\n*\n* @private\n* @param {Object} x - input array object\n* @param {integer} separator - separator\n* @returns {string} output string\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = indexed( x, ',' );\n* // returns '1,2,3,4'\n*/\nfunction indexed( x, separator ) {\n\tvar out;\n\tvar N;\n\tvar v;\n\tvar i;\n\n\tN = x.length - 1;\n\tout = '';\n\tfor ( i = 0; i <= N; i++ ) {\n\t\tv = x[ i ];\n\t\tif ( !isUndefinedOrNull( v ) ) {\n\t\t\tout += String( v );\n\t\t}\n\t\tif ( i < N ) {\n\t\t\tout += separator;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns a string created by joining array elements using a specified separator.\n*\n* @param {Collection} x - input array\n* @param {integer} separator - separator\n* @returns {string} output string\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = join( x, ',' );\n* // returns '1,2,3,4'\n*\n* @example\n* var x = [ 1, 2, 3, null, undefined, 4 ];\n*\n* var out = join( x, '-' );\n* // returns '1-2-3---4'\n*/\nfunction join( x, separator ) {\n\tvar obj;\n\tif ( hasMethod( x, 'join' ) ) {\n\t\treturn x.join( separator );\n\t}\n\tobj = arraylike2object( x );\n\tif ( obj.accessorProtocol ) {\n\t\treturn accessors( obj, separator );\n\t}\n\treturn indexed( x, separator );\n}\n\n\n// EXPORTS //\n\nexport default join;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Generates a linearly spaced numeric array whose elements increment by 1 starting from zero.\n*\n* @param {number} n - number of elements\n* @returns {Array} linearly spaced numeric array\n*\n* @example\n* var arr = zeroTo( 6 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*/\nfunction zeroTo( n ) {\n\tvar arr;\n\tvar i;\n\n\tarr = [];\n\tif ( n <= 0 ) {\n\t\treturn arr;\n\t}\n\tfor ( i = 0; i < n; i++ ) {\n\t\tarr.push( i );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default zeroTo;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\n\n\n// FUNCTIONS //\n\n/**\n* Fills an indexed array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = indexed( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = indexed( out, -1, out.length-1 );\n* // returns [ 5, 4, 3, 2, 1, 0 ]\n*/\nfunction indexed( out, stride, offset ) {\n\tvar v;\n\tvar i;\n\n\ti = offset;\n\tv = 0;\n\twhile ( i >= 0 && i < out.length ) {\n\t\tout[ i ] = v;\n\t\ti += stride;\n\t\tv += 1;\n\t}\n\treturn out;\n}\n\n/**\n* Fills a complex number array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {(Complex128Array|Complex64Array)} out - output complex number array\n* @param {(Float64Array|Float32Array)} data - output array data\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {(Complex128Array|Complex64Array)} output array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\n*\n* var out = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n* // returns \n*\n* var data = reinterpret128( out, 0 );\n* // returns [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]\n*\n* var arr = complex( out, data, 1, 0 );\n* // returns \n*\n* var bool = ( arr === out );\n* // returns true\n*\n* data = reinterpret128( out, 0 );\n* returns [ 0.0, 0.0, 1.0, 0.0, 2.0, 0.0 ]\n*/\nfunction complex( out, data, stride, offset ) {\n\tvar v;\n\tvar s;\n\tvar i;\n\n\ts = stride * 2;\n\ti = offset * 2;\n\tv = 0.0;\n\twhile ( i >= 0 && i < data.length ) {\n\t\tdata[ i ] = v; // real component\n\t\tdata[ i+1 ] = 0.0; // imaginary component\n\t\ti += s;\n\t\tv += 1.0;\n\t}\n\treturn out;\n}\n\n/**\n* Fills an accessor array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {Object} out - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n\n* var out = toAccessorArray( [ 0, 0, 0, 0, 0, 0 ] );\n* var arr = accessors( arraylike2object( out ), 1, 0 );\n*\n* var bool = ( arr === out );\n* // returns true\n*\n* var v = out.get( 0 );\n* // returns 0\n*\n* v = out.get( out.length-1 );\n* // returns 5\n*/\nfunction accessors( out, stride, offset ) {\n\tvar data;\n\tvar set;\n\tvar v;\n\tvar i;\n\n\tdata = out.data;\n\tset = out.accessors[ 1 ];\n\n\ti = offset;\n\tv = 0;\n\twhile ( i >= 0 && i < data.length ) {\n\t\tset( data, i, v );\n\t\ti += stride;\n\t\tv += 1;\n\t}\n\treturn data;\n}\n\n\n// MAIN //\n\n/**\n* Fills an array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = assign( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = assign( out, -1, out.length-1 );\n* // returns [ 5, 4, 3, 2, 1, 0 ]\n*/\nfunction assign( out, stride, offset ) {\n\tvar obj = arraylike2object( out );\n\tif ( obj.accessorProtocol ) {\n\t\t// If provided a complex number array, reinterpret as a real typed array and only set the real components...\n\t\tif ( obj.dtype === 'complex128' ) {\n\t\t\treturn complex( out, reinterpret128( out, 0 ), stride, offset );\n\t\t}\n\t\tif ( obj.dtype === 'complex64' ) {\n\t\t\treturn complex( out, reinterpret64( out, 0 ), stride, offset );\n\t\t}\n\t\treturn accessors( obj, stride, offset );\n\t}\n\treturn indexed( out, stride, offset );\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Takes elements from an indexed array.\n*\n* @param {Collection} x - input array\n* @param {NonNegativeIntegerArray} indices - list of indices\n* @returns {Array} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n* var indices = [ 3, 1, 2, 0 ];\n*\n* var y = take( x, indices );\n* // returns [ 4, 2, 3, 1 ]\n*/\nfunction take( x, indices ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\tout.push( x[ indices[ i ] ] ); // use `Array#push` to ensure \"fast\" elements\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default take;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport copy from '@stdlib/array-base-copy-indexed';\nimport take from '@stdlib/array-base-take-indexed';\nimport sort2ins from './sort2ins.js';\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: input ndarray strides sorted in loop order.\n* - **sy**: output ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - input array stride lengths\n* @param {IntegerArray} sy - output array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 6, -2, 1 ]\n*/\nfunction loopOrder( sh, sx, sy ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the input array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape and output array strides based on the sorted input array strides:\n\tsh = take( sh, idx );\n\tsy = take( sy, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'sy': sy\n\t};\n}\n\n\n// EXPORTS //\n\nexport default loopOrder;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default sort2ins;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Generate a linearly spaced numeric array whose elements increment by 1 starting from zero.\n*\n* @module @stdlib/array-base-zero-to\n*\n* @example\n* import zeroTo from '@stdlib/array-base-zero-to';\n*\n* var arr = zeroTo( 6 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* import zeroTo from '@stdlib/array-base-zero-to';\n*\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n* var arr = zeroTo.assign( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* var bool = ( out === arr );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport defaults from './defaults.js';\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - input array data type\n* @param {string} dtypeY - output array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = unaryBlockSize( 'float64', 'float64' );\n* // returns \n*/\nfunction unaryBlockSize( dtypeX, dtypeY ) {\n\tvar nbx;\n\tvar nby;\n\n\tnbx = bytesPerElement( dtypeX );\n\tnby = bytesPerElement( dtypeY );\n\tif ( nbx === null || nby === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\tif ( nbx > nby ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nby )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default unaryBlockSize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Increments index offsets according to a list of increments.\n*\n* ## Notes\n*\n* - This function mutates the list of index offsets.\n*\n* @private\n* @param {NonNegativeIntegerArray} offsets - list of index offsets\n* @param {NonNegativeIntegerArray} inc - list of increments\n* @returns {NonNegativeIntegerArray} updated offsets\n*/\nfunction incrementOffsets( offsets, inc ) {\n\tvar i;\n\tfor ( i = 0; i < offsets.length; i++ ) {\n\t\toffsets[ i ] += inc[ i ];\n\t}\n\treturn offsets;\n}\n\n\n// EXPORTS //\n\nexport default incrementOffsets;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets view offsets according to a list of index offsets.\n*\n* ## Notes\n*\n* - This function skips the second element in the list of index offsets, as that is assumed to correspond to the output ndarray which does not have a corresponding view. Meaning, the list of views is expected to have `N` elements, and the list of index offsets is expected to have `N+1` elements.\n* - This function mutates the provides view objects.\n*\n* @private\n* @param {Array} views - list of ndarray-like objects representing ndarray views\n* @param {NonNegativeIntegerArray} offsets - list of index offsets\n* @returns {Array} updated views\n*/\nfunction setViewOffsets( views, offsets ) {\n\tvar i;\n\tvar j;\n\tfor ( i = 0, j = 0; i < offsets.length; i++ ) {\n\t\tif ( i === 1 ) { // note: expected to correspond to the output ndarray which does not have a corresponding view\n\t\t\tcontinue;\n\t\t}\n\t\tviews[ j ].offset = offsets[ i ];\n\t\tj += 1;\n\t}\n\treturn views;\n}\n\n\n// EXPORTS //\n\nexport default setViewOffsets;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Resolves index offsets from a list of ndarray-like objects.\n*\n* @private\n* @param {ArrayLikeObject} arrays - list of ndarray-like objects\n* @returns {NonNegativeIntegerArray} list of offsets\n*/\nfunction offsets( arrays ) {\n\tvar out = [];\n\tvar i;\n\tfor ( i = 0; i < arrays.length; i++ ) {\n\t\tout.push( arrays[ i ].offset );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default offsets;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'boolean': 'bool',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128',\n\t'BooleanArray': 'bool'\n};\n\n\n// EXPORTS //\n\nexport default ctor2dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Boolean from '@stdlib/boolean-ctor';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {Array} output array\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tout.push( Boolean( v.value ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Boolean from '@stdlib/boolean-ctor';\nimport getter from '@stdlib/array-base-getter';\nimport floor from '@stdlib/math-base-special-floor';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Uint8Array.BYTES_PER_ELEMENT;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a `BooleanArray`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `BooleanArray`\n*/\nfunction isBooleanArray( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'BooleanArray' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a boolean typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean typed array constructor\n*/\nfunction isBooleanArrayConstructor( value ) {\n\treturn ( value === BooleanArray);\n}\n\n\n// MAIN //\n\n/**\n* Boolean array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @returns {BooleanArray} boolean array\n*\n* @example\n* var arr = new BooleanArray();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new BooleanArray( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new BooleanArray( [ true, false ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new BooleanArray( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 16\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new BooleanArray( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 8\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new BooleanArray( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction BooleanArray() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\tvar arg;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof BooleanArray) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new BooleanArray();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new BooleanArray( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new BooleanArray( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new BooleanArray( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Uint8Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\targ = arguments[ 0 ];\n\t\tif ( isNonNegativeInteger( arg ) ) {\n\t\t\tbuf = new Uint8Array( arg );\n\t\t} else if ( isCollection( arg ) ) {\n\t\t\tbuf = fromArray( new Uint8Array( arg.length ), arg );\n\t\t} else if ( isArrayBuffer( arg ) ) {\n\t\t\tbuf = new Uint8Array( arg );\n\t\t} else if ( isObject( arg ) ) {\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tif ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tbuf = arg[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tbuf = new Uint8Array( fromIterator( buf ) );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tbuf = new Uint8Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Uint8Array( buf, byteOffset, len );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof BooleanArray\n* @readonly\n* @type {PositiveInteger}\n* @default 1\n*\n* @example\n* var nbytes = BooleanArray.BYTES_PER_ELEMENT;\n* // returns 1\n*/\nsetReadOnly( BooleanArray, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof BooleanArray\n* @readonly\n* @type {string}\n* @default 'BooleanArray'\n*\n* @example\n* var str = BooleanArray.name;\n* // returns 'BooleanArray'\n*/\nsetReadOnly( BooleanArray, 'name', 'BooleanArray' );\n\n/**\n* Creates a new boolean array from an array-like object or an iterable.\n*\n* @name from\n* @memberof BooleanArray\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @returns {BooleanArray} boolean array\n*\n* @example\n* var arr = BooleanArray.from( [ true, false ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* function clbk( v ) {\n* return !v;\n* }\n*\n* var arr = BooleanArray.from( [ true, false ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( BooleanArray, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isBooleanArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tbuf[ i ] = Boolean( clbk.call( thisArg, get( src, i ), i ) );\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tlen = tmp.length;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new boolean array from a variable number of arguments.\n*\n* @name of\n* @memberof BooleanArray\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a boolean array\n* @returns {BooleanArray} boolean array\n*\n* @example\n* var arr = BooleanArray.of( true, true, true, true );\n* // returns \n*\n* var len = arr.length;\n* // returns 4\n*/\nsetReadOnly( BooleanArray, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isBooleanArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( BooleanArray.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 10\n*/\nsetReadOnlyAccessor( BooleanArray.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( BooleanArray.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 1\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 1\n*/\nsetReadOnly( BooleanArray.prototype, 'BYTES_PER_ELEMENT', BooleanArray.BYTES_PER_ELEMENT );\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {(boolean|void)} array element or undefined\n*\n* @example\n* function predicate( v ) {\n* return v === true;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var v = arr.find( predicate );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = Boolean( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn v;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* function predicate( v ) {\n* return v === true;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var v = arr.findIndex( predicate );\n* // returns 0\n*/\nsetReadOnly( BooleanArray.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = Boolean( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {(boolean|void)} array element or undefined\n*\n* @example\n* function predicate( v ) {\n* return v === true;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var v = arr.findLast( predicate );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tv = Boolean( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn v;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* function predicate( v ) {\n* return v === true;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var v = arr.findLastIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( BooleanArray.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tv = Boolean( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(boolean|void)} array element\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var v = arr.get( 0 );\n* // returns false\n*\n* arr.set( [ true, false ], 0 );\n*\n* v = arr.get( 0 );\n* // returns true\n*\n* v = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( BooleanArray.prototype, 'get', function get( idx ) {\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn Boolean( this._buffer[ idx ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( BooleanArray.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {BooleanArray} new boolean array\n*\n* @example\n* function invert( v ) {\n* return !v;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var out = arr.map( invert );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns false\n*\n* z = out.get( 1 );\n* // returns true\n*\n* z = out.get( 2 );\n* // returns false\n*/\nsetReadOnly( BooleanArray.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be a function. Value: `%s`.', fcn );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\toutbuf[ i ] = Boolean( fcn.call( thisArg, Boolean( buf[ i ] ), i, this ) );\n\t}\n\treturn out;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a boolean array\n* @returns {BooleanArray} reversed array\n*\n* @example\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( false, 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var v = out.get( 0 );\n* // returns false\n*\n* v = out.get( 1 );\n* // returns false\n*\n* v = out.get( 2 );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ i ];\n\t\tbuf[ i ] = buf[ j ];\n\t\tbuf[ j ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {(Collection|BooleanArray|*)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var v = arr.get( 0 );\n* // returns false\n*\n* arr.set( [ true, false ], 0 );\n*\n* v = arr.get( 0 );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'set', function set( value ) {\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isCollection( value ) ) {\n\t\tN = value.length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tif ( isBooleanArray( value ) ) {\n\t\t\tsbuf = value._buffer; // eslint-disable-line no-underscore-dangle\n\t\t} else {\n\t\t\tsbuf = value;\n\t\t}\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Uint8Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tfor ( i = 0; i < N; idx++, i++ ) {\n\t\t\tbuf[ idx ] = ( sbuf[ i ] ) ? 1 : 0;\n\t\t}\n\t\treturn;\n\t}\n\tif ( idx >= this._length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t}\n\tbuf[ idx ] = ( value ) ? 1 : 0;\n});\n\n/**\n* Sorts an array in-place.\n*\n* @name sort\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} [compareFcn] - comparison function\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {BooleanArray} sorted array\n*\n* @example\n* function compare( a, b ) {\n* if ( a === false ) {\n* if ( b === false ) {\n* return 0;\n* }\n* return 1;\n* }\n* if ( b === true ) {\n* return 0;\n* }\n* return -1;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* arr.sort( compare );\n*\n* var v = arr.get( 0 );\n* // returns true\n*\n* v = arr.get( 1 );\n* // returns true\n*\n* v = arr.get( 2 );\n* // returns false\n*\n*/\nsetReadOnly( BooleanArray.prototype, 'sort', function sort( compareFcn ) {\n\tvar buf;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length === 0 ) {\n\t\tbuf.sort();\n\t\treturn this;\n\t}\n\tif ( !isFunction( compareFcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', compareFcn ) );\n\t}\n\tbuf.sort( compare );\n\treturn this;\n\n\t/**\n\t* Comparison function for sorting.\n\t*\n\t* @private\n\t* @param {boolean} a - first boolean value for comparison\n\t* @param {boolean} b - second boolean value for comparison\n\t* @returns {number} comparison result\n\t*/\n\tfunction compare( a, b ) {\n\t\treturn compareFcn( Boolean( a ), Boolean( b ) );\n\t}\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a boolean array\n* @returns {BooleanArray} reversed array\n*\n* @example\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( false, 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var v = out.get( 0 );\n* // returns false\n*\n* v = out.get( 1 );\n* // returns false\n*\n* v = out.get( 2 );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\toutbuf[ i ] = buf[ len - i - 1 ];\n\t}\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default BooleanArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Boolean from '@stdlib/boolean-ctor';\n\n\n// MAIN //\n\n/**\n* Fills an output array with \"boolean\" values.\n*\n* @private\n* @param {Uint8Array} buf - output array\n* @param {Array} arr - input array\n* @returns {Uint8Array} output array\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar i;\n\n\tlen = arr.length;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tbuf[ i ] = Boolean( arr[ i ] );\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Boolean from '@stdlib/boolean-ctor';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {Array} output array\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tout.push( Boolean( clbk.call( thisArg, v.value, i ) ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\nimport BooleanArray from '@stdlib/array-bool';\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array,\n\tBooleanArray\n];\n\n\n// EXPORTS //\n\nexport default CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128',\n\t'bool'\n];\n\n\n// EXPORTS //\n\nexport default DTYPES;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './dtypes.js';\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isCollection from '@stdlib/assert-is-collection';\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport dtype from '@stdlib/array-dtype';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function to tests if an array contains a provided search value.\n*\n* @param {Collection} x - input array\n* @throws {TypeError} must provide an array-like object\n* @returns {Function} function to test if an array contains a search value\n*\n* @example\n* var contains = factory( [ 1, 2, 3 ] );\n* // returns \n*\n* var bool = contains( 2 );\n* // returns true\n*/\nfunction factory( x ) {\n\tvar get;\n\tvar len;\n\tvar dt;\n\n\tif ( !isCollection( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an array-like object. Value: `%s`.', x ) );\n\t}\n\t// Resolve the input array data type:\n\tdt = dtype( x );\n\n\t// Resolve an accessor for retrieving input array elements:\n\tif ( isAccessorArray( x ) ) {\n\t\tget = accessorGetter( dt );\n\t}\n\t// Get the number of elements over which to iterate:\n\tlen = x.length;\n\n\treturn ( get === void 0 ) ? contains : accessors;\n\t/**\n\t* Tests if an array contains a provided search value.\n\t*\n\t* @private\n\t* @param {*} value - search value\n\t* @returns {boolean} boolean indicating if an array contains a search value\n\t*\n\t* @example\n\t* var out = contains( [ 1, 2, 3 ], 2 );\n\t* // returns true\n\t*/\n\tfunction contains( value ) {\n\t\tvar i;\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( x[ i ] === value ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Tests if an array contains a provided search value.\n\t*\n\t* @private\n\t* @param {*} value - search value\n\t* @returns {boolean} boolean indicating if an array contains a search value\n\t*/\n\tfunction accessors( value ) {\n\t\tvar i;\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( get( x, i ) === value ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if an array contains a provided search value.\n*\n* @module @stdlib/array-base-assert-contains\n*\n* @example\n* import contains from '@stdlib/array-base-assert-contains';\n*\n* var out = contains( [ 1, 2, 3 ], 2 );\n* // returns true\n*/\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport factory from './factory.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default main;\n\n// exports: { \"factory\": \"main.factory\" }\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport getter from '@stdlib/array-base-getter';\nimport dtype from '@stdlib/array-dtype';\n\n\n// MAIN //\n\n/**\n* Tests if an array contains a provided search value.\n*\n* @param {Collection} x - input array\n* @param {*} value - search value\n* @returns {boolean} boolean indicating if an array contains a search value\n*\n* @example\n* var out = contains( [ 1, 2, 3 ], 2 );\n* // returns true\n*/\nfunction contains( x, value ) {\n\tvar len;\n\tvar get;\n\tvar dt;\n\tvar i;\n\n\t// Resolve the input array data type:\n\tdt = dtype( x );\n\n\t// Resolve an accessor for retrieving input array elements:\n\tif ( isAccessorArray( x ) ) {\n\t\tget = accessorGetter( dt );\n\t} else {\n\t\tget = getter( dt );\n\t}\n\t// Get the number of elements over which to iterate:\n\tlen = x.length;\n\n\t// Loop over the elements...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( get( x, i ) === value ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default contains;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport replace from '@stdlib/string-base-replace';\nimport DTYPES from './dtypes.json';\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of array data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of array data types\n*\n* @example\n* var list = dtypes();\n* // e.g., returns [ 'float32', 'float64', ... ]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport dtypes from '@stdlib/array-dtypes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported array complex-valued floating-point data type.\n*\n* @name isComplexFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported array complex-valued floating-point data type\n*\n* @example\n* var bool = isComplexFloatingPointDataType( 'complex64' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'complex128' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'float32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'float64' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isComplexFloatingPointDataType = contains( dtypes( 'complex_floating_point' ) ); // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nexport default isComplexFloatingPointDataType;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport dtypes from '@stdlib/array-dtypes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported array boolean data type.\n*\n* @name isBooleanDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported array boolean data type\n*\n* @example\n* var bool = isBooleanDataType( 'bool' );\n* // returns true\n*\n* bool = isBooleanDataType( 'complex64' );\n* // returns false\n*\n* bool = isBooleanDataType( 'complex128' );\n* // returns false\n*\n* bool = isBooleanDataType( 'float32' );\n* // returns false\n*\n* bool = isBooleanDataType( 'float64' );\n* // returns false\n*\n* bool = isBooleanDataType( 'generic' );\n* // returns false\n*\n* bool = isBooleanDataType( 'int16' );\n* // returns false\n*\n* bool = isBooleanDataType( 'int32' );\n* // returns false\n*\n* bool = isBooleanDataType( 'int8' );\n* // returns false\n*\n* bool = isBooleanDataType( 'uint16' );\n* // returns false\n*\n* bool = isBooleanDataType( 'uint32' );\n* // returns false\n*\n* bool = isBooleanDataType( 'uint8' );\n* // returns false\n*\n* bool = isBooleanDataType( 'uint8c' );\n* // returns false\n*\n* bool = isBooleanDataType( 'foo' );\n* // returns false\n*/\nvar isBooleanDataType = contains( dtypes( 'boolean' ) );\n\n\n// EXPORTS //\n\nexport default isBooleanDataType;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Reinterprets a complex-valued floating-point array as a real-valued floating-point array having the same precision.\n*\n* @param {(Complex128Array|Complex64Array)} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @throws {TypeError} first argument must be a supported complex-valued floating-point array\n* @returns {(Float64Array|Float32Array)} real-valued floating-point array view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\tif ( isComplex128Array( x ) ) {\n\t\treturn reinterpret128( x, offset );\n\t}\n\tif ( isComplex64Array( x ) ) {\n\t\treturn reinterpret64( x, offset );\n\t}\n\t// Note: intentionally throw here to catch the scenario in which we add, e.g., a Complex32Array and need to explicitly add support here...\n\tthrow new TypeError( format( 'invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.', x ) );\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Uint8Array from '@stdlib/array-uint8';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `BooleanArray` as a `Uint8Array`.\n*\n* @param {BooleanArray} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Uint8Array} `Uint8Array` view\n*\n* @example\n* import BooleanArray from '@stdlib/array-bool';\n*\n* var x = new BooleanArray( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Uint8Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), x.length-offset ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport reinterpret from '@stdlib/strided-base-reinterpret-complex';\nimport reinterpretBoolean from '@stdlib/strided-base-reinterpret-boolean';\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\nimport format from '@stdlib/string-format';\n\n\n// FUNCTIONS //\n\n/**\n* Copies every element from one array to another array, except for the element at a specified index.\n*\n* @private\n* @param {Collection} x - input array\n* @param {integer} index - element index\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = [ 0, 0, 0 ];\n* var arr = indexed( x, 0, out, 1, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* var bool = ( arr === out );\n* // returns true\n*/\nfunction indexed( x, index, out, stride, offset ) {\n\tvar io;\n\tvar i;\n\n\tio = offset;\n\tfor ( i = 0; i < x.length; i++ ) {\n\t\tif ( i === index ) {\n\t\t\tcontinue;\n\t\t}\n\t\tout[ io ] = x[ i ];\n\t\tio += stride;\n\t}\n\treturn out;\n}\n\n/**\n* Copies every element from one accessor array to another accessor array, except for the element at a specified index.\n*\n* @private\n* @param {Object} x - input array object\n* @param {integer} index - element index\n* @param {Object} out - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n*\n* var x = toAccessorArray( [ 1, 2, 3, 4 ] );\n*\n* var out = toAccessorArray( [ 0, 0, 0 ] );\n* var arr = accessors( arraylike2object( x ), 0, arraylike2object( out ), 1, 0 );\n*\n* var v = arr.get( 0 );\n* // returns 2\n*/\nfunction accessors( x, index, out, stride, offset ) {\n\tvar xdata;\n\tvar odata;\n\tvar xget;\n\tvar oset;\n\tvar io;\n\tvar i;\n\n\txdata = x.data;\n\todata = out.data;\n\n\txget = x.accessors[ 0 ];\n\toset = out.accessors[ 1 ];\n\n\tio = offset;\n\tfor ( i = 0; i < xdata.length; i++ ) {\n\t\tif ( i === index ) {\n\t\t\tcontinue;\n\t\t}\n\t\toset( odata, io, xget( xdata, i ) );\n\t\tio += stride;\n\t}\n\treturn odata;\n}\n\n/**\n* Copies every element from one complex array to another complex array, except for the element at a specified index.\n*\n* @private\n* @param {Collection} x - real-valued floating-point input array view\n* @param {integer} index - element index\n* @param {Collection} out - real-valued floating-point output array view\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array view\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import Float64Array from '@stdlib/array-float64';\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var out = new Float64Array( 2 );\n* var arr = complex( x, 0, out, 1, 0 );\n* // returns [ 3.0, 4.0 ]\n*/\nfunction complex( x, index, out, stride, offset ) {\n\tvar so;\n\tvar io;\n\tvar i;\n\tvar j;\n\n\tso = stride * 2; // multiply by 2, as real-valued array consists of interleaved real and imaginary components\n\tio = offset * 2;\n\tfor ( i = 0; i < x.length/2; i++ ) {\n\t\tif ( i === index ) {\n\t\t\tcontinue;\n\t\t}\n\t\tj = i * 2;\n\t\tout[ io ] = x[ j ];\n\t\tout[ io+1 ] = x[ j+1 ];\n\t\tio += so;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Copies every element from one array to another array, except for the element at a specified index.\n*\n* @param {Collection} x - input array\n* @param {integer} index - element index\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @throws {RangeError} second argument must not exceed array bounds\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = [ 0, 0, 0 ];\n* var arr = assign( x, 0, out, 1, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* var bool = ( arr === out );\n* // returns true\n*/\nfunction assign( x, index, out, stride, offset ) {\n\tvar xo;\n\tvar oo;\n\n\tindex = normalizeIndex( index, x.length-1 );\n\tif ( index < 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%d`.', index ) );\n\t}\n\txo = arraylike2object( x );\n\too = arraylike2object( out );\n\tif ( xo.accessorProtocol || oo.accessorProtocol ) {\n\t\t// Note: we only explicitly support a limited set of dtype-to-dtype pairs, as this function should not be concerned with casting rules, etc. That is left to userland...\n\t\tif (\n\t\t\tisComplexDataType( xo.dtype ) &&\n\t\t\tisComplexDataType( oo.dtype )\n\t\t) {\n\t\t\tcomplex( reinterpret( x, 0 ), index, reinterpret( out, 0 ), stride, offset ); // eslint-disable-line max-len\n\t\t\treturn out;\n\t\t}\n\t\tif (\n\t\t\tisBooleanDataType( xo.dtype ) &&\n\t\t\tisBooleanDataType( oo.dtype )\n\t\t) {\n\t\t\tindexed( reinterpretBoolean( x, 0 ), index, reinterpretBoolean( out, 0 ), stride, offset ); // eslint-disable-line max-len\n\t\t\treturn out;\n\t\t}\n\t\taccessors( xo, index, oo, stride, offset );\n\t\treturn out;\n\t}\n\tindexed( x, index, out, stride, offset );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\nimport zeros from '@stdlib/array-zeros';\nimport dtype from '@stdlib/array-dtype';\nimport format from '@stdlib/string-format';\nimport assign from './assign.js';\n\n\n// MAIN //\n\n/**\n* Returns a new array containing every element from an input array, except for the element at a specified index.\n*\n* @param {Collection} x - input array\n* @param {integer} index - element index\n* @throws {RangeError} second argument must not exceed array bounds\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var v = without( x, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* v = without( x, 1 );\n* // returns [ 1, 3, 4 ]\n*\n* v = without( x, -2 );\n* // returns [ 1, 2, 4 ]\n*/\nfunction without( x, index ) {\n\tvar out;\n\n\tindex = normalizeIndex( index, x.length-1 );\n\tif ( index < 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%d`.', index ) );\n\t}\n\tout = zeros( x.length-1, dtype( x ) || 'generic' );\n\tassign( x, index, out, 1, 0 );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default without;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Converts a linear index in an array view to a linear index in an underlying data buffer.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index in an array view\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {NonNegativeInteger} linear index in an underlying data buffer\n*\n* @example\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = vind2bind( shape, strides, offset, order, 1, mode );\n* // returns 7\n*/\nfunction vind2bind( shape, strides, offset, order, idx, mode ) {\n\tvar ndims;\n\tvar len;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ( mode === 'normalize' && idx < 0 ) {\n\t\t\tidx += len;\n\t\t}\n\t\tif ( idx < 0 || idx >= len ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tind = offset;\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\treturn ind;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\treturn ind;\n}\n\n\n// EXPORTS //\n\nexport default vind2bind;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a new array containing every element from an input array, except for the element at a specified index.\n*\n* @module @stdlib/array-base-without\n*\n* @example\n* import without from '@stdlib/array-base-without';\n*\n* var x = [ 1, 2, 3, 4 ];\n*\n* var v = without( x, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* v = without( x, -2 );\n* // returns [ 1, 2, 4 ]\n*\n* @example\n* import without from '@stdlib/array-base-without';\n*\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = [ 0, 0, 0 ];\n* var arr = without.assign( x, 0, out, 1, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* var bool = ( arr === out );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\nimport zeros from '@stdlib/array-base-zeros';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unarynd( base, [ x, y ], views, [ 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ true, false, true ]\n*/\nfunction unarynd( fcn, arrays, views, strides, opts ) {\n\tvar ybuf;\n\tvar len;\n\tvar set;\n\tvar sh;\n\tvar iv;\n\tvar io;\n\tvar N;\n\tvar v;\n\tvar y;\n\tvar i;\n\tvar j;\n\n\tN = arrays.length;\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate based on the linear **view** index, regardless as to how the data is stored in memory...\n\tio = zeros( N );\n\tfor ( i = 0; i < len; i++ ) {\n\t\tfor ( j = 0; j < N; j++ ) {\n\t\t\tv = arrays[ j ];\n\t\t\tio[ j ] = vind2bind( sh, v.strides, iv[ j ], v.order, i, MODE );\n\t\t}\n\t\tsetViewOffsets( views, io );\n\t\tset( ybuf, io[1], fcn( views, opts ) );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unarynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\nimport zeros from '@stdlib/array-base-zeros';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unarynd( base, [ x, y ], views, [ 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ true, false, true ]\n*/\nfunction unarynd( fcn, arrays, views, strides, opts ) {\n\tvar ybuf;\n\tvar len;\n\tvar sh;\n\tvar iv;\n\tvar io;\n\tvar N;\n\tvar v;\n\tvar y;\n\tvar i;\n\tvar j;\n\n\tN = arrays.length;\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate based on the linear **view** index, regardless as to how the data is stored in memory...\n\tio = zeros( N );\n\tfor ( i = 0; i < len; i++ ) {\n\t\tfor ( j = 0; j < N; j++ ) {\n\t\t\tv = arrays[ j ];\n\t\t\tio[ j ] = vind2bind( sh, v.strides, iv[ j ], v.order, i, MODE );\n\t\t}\n\t\tsetViewOffsets( views, io );\n\t\tybuf[ io[1] ] = fcn( views, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unarynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ndarray2object from '@stdlib/ndarray-base-ndarraylike2object';\nimport normalizeIndices from '@stdlib/ndarray-base-to-unique-normalized-indices';\nimport indicesComplement from '@stdlib/array-base-indices-complement';\nimport takeIndexed2 from '@stdlib/array-base-take-indexed2';\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport strides2order from '@stdlib/ndarray-base-strides2order';\nimport numel from '@stdlib/ndarray-base-numel';\nimport join from '@stdlib/array-base-join';\nimport format from '@stdlib/string-format';\nimport initializeViews from './initialize_array_views.js';\nimport blockedaccessorunary2d from './2d_blocked_accessors.js';\nimport blockedaccessorunary3d from './3d_blocked_accessors.js';\nimport blockedaccessorunary4d from './4d_blocked_accessors.js';\nimport blockedaccessorunary5d from './5d_blocked_accessors.js';\nimport blockedaccessorunary6d from './6d_blocked_accessors.js';\nimport blockedaccessorunary7d from './7d_blocked_accessors.js';\nimport blockedaccessorunary8d from './8d_blocked_accessors.js';\nimport blockedaccessorunary9d from './9d_blocked_accessors.js';\nimport blockedaccessorunary10d from './10d_blocked_accessors.js';\nimport blockedunary2d from './2d_blocked.js';\nimport blockedunary3d from './3d_blocked.js';\nimport blockedunary4d from './4d_blocked.js';\nimport blockedunary5d from './5d_blocked.js';\nimport blockedunary6d from './6d_blocked.js';\nimport blockedunary7d from './7d_blocked.js';\nimport blockedunary8d from './8d_blocked.js';\nimport blockedunary9d from './9d_blocked.js';\nimport blockedunary10d from './10d_blocked.js';\nimport accessorunary0d from './0d_accessors.js';\nimport accessorunary1d from './1d_accessors.js';\nimport accessorunary2d from './2d_accessors.js';\nimport accessorunary3d from './3d_accessors.js';\nimport accessorunary4d from './4d_accessors.js';\nimport accessorunary5d from './5d_accessors.js';\nimport accessorunary6d from './6d_accessors.js';\nimport accessorunary7d from './7d_accessors.js';\nimport accessorunary8d from './8d_accessors.js';\nimport accessorunary9d from './9d_accessors.js';\nimport accessorunary10d from './10d_accessors.js';\nimport accessorunarynd from './nd_accessors.js';\nimport unary0d from './0d.js';\nimport unary1d from './1d.js';\nimport unary2d from './2d.js';\nimport unary3d from './3d.js';\nimport unary4d from './4d.js';\nimport unary5d from './5d.js';\nimport unary6d from './6d.js';\nimport unary7d from './7d.js';\nimport unary8d from './8d.js';\nimport unary9d from './9d.js';\nimport unary10d from './10d.js';\nimport unarynd from './nd.js';\n\n\n// VARIABLES //\n\nvar UNARY = [\n\tunary0d,\n\tunary1d,\n\tunary2d,\n\tunary3d,\n\tunary4d,\n\tunary5d,\n\tunary6d,\n\tunary7d,\n\tunary8d,\n\tunary9d,\n\tunary10d\n];\nvar ACCESSOR_UNARY = [\n\taccessorunary0d,\n\taccessorunary1d,\n\taccessorunary2d,\n\taccessorunary3d,\n\taccessorunary4d,\n\taccessorunary5d,\n\taccessorunary6d,\n\taccessorunary7d,\n\taccessorunary8d,\n\taccessorunary9d,\n\taccessorunary10d\n];\nvar BLOCKED_UNARY = [\n\tblockedunary2d, // 0\n\tblockedunary3d,\n\tblockedunary4d,\n\tblockedunary5d,\n\tblockedunary6d,\n\tblockedunary7d,\n\tblockedunary8d,\n\tblockedunary9d,\n\tblockedunary10d // 8\n];\nvar BLOCKED_ACCESSOR_UNARY = [\n\tblockedaccessorunary2d, // 0\n\tblockedaccessorunary3d,\n\tblockedaccessorunary4d,\n\tblockedaccessorunary5d,\n\tblockedaccessorunary6d,\n\tblockedaccessorunary7d,\n\tblockedaccessorunary8d,\n\tblockedaccessorunary9d,\n\tblockedaccessorunary10d // 8\n];\nvar MAX_DIMS = UNARY.length - 1;\n\n\n// MAIN //\n\n/**\n* Performs a reduction over a list of specified dimensions in an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {ArrayLikeObject} arrays - array-like object containing ndarrays\n* @param {IntegerArray} dims - list of dimensions over which to perform a reduction\n* @param {Options} [options] - function options\n* @throws {Error} arrays must have the expected number of dimensions\n* @throws {RangeError} dimension indices must not exceed input ndarray bounds\n* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions\n* @throws {Error} must provide unique dimension indices\n* @throws {Error} arrays must have the same loop dimension sizes\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import every from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unaryReduceSubarray( every, [ x, y ], [ 2, 3 ] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import every from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = [ false ];\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unaryReduceSubarray( every, [ x, y ], [ 0, 1, 2, 3 ] );\n*\n* var v = y.data;\n* // returns [ true ]\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import every from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 12 );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unaryReduceSubarray( every, [ x, y ], [] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, true ], [ true, true ] ], [ [ true, false ], [ true, true ] ], [ [ true, true ], [ true, true ] ] ]\n*/\nfunction unaryReduceSubarray( fcn, arrays, dims, options ) { // eslint-disable-line max-statements\n\tvar views;\n\tvar ndims;\n\tvar ldims;\n\tvar opts;\n\tvar arr;\n\tvar tmp;\n\tvar len;\n\tvar shx;\n\tvar shc;\n\tvar shl;\n\tvar iox;\n\tvar ioy;\n\tvar ord;\n\tvar sc;\n\tvar sl;\n\tvar sy;\n\tvar ns;\n\tvar d;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar K;\n\tvar x;\n\tvar y;\n\tvar i;\n\tvar j;\n\n\tif ( arguments.length > 3 ) {\n\t\topts = options;\n\t} else {\n\t\topts = {};\n\t}\n\t// Standardize ndarray meta data...\n\tN = arrays.length;\n\tarr = [];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tarr.push( ndarray2object( arrays[ i ] ) );\n\t}\n\t// Cache references to the input and output arrays:\n\tx = arr[ 0 ];\n\ty = arr[ 1 ];\n\n\t// Resolve the number of input array dimensions:\n\tshx = x.shape;\n\tndims = shx.length;\n\n\t// Verify that we've been provided a list of unique dimension indices...\n\tM = dims.length;\n\td = normalizeIndices( dims, ndims-1 );\n\tif ( d === null ) {\n\t\tthrow new RangeError( format( 'invalid argument. Third argument contains an out-of-bounds dimension index. Value: [%s].', join( dims, ',' ) ) );\n\t}\n\td.sort();\n\tif ( d.length !== M ) {\n\t\tthrow new Error( format( 'invalid argument. Third argument must contain a list of unique dimension indices. Value: [%s].', join( dims, ',' ) ) );\n\t}\n\t// Check whether we've been provided a valid number of dimensions to reduce...\n\tif ( M > ndims ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of specified dimensions cannot exceed the number of dimensions in the input array. Number of dimensions: %d. Value: [%s].', ndims, join( dims, ',' ) ) );\n\t}\n\t// Verify that provided ndarrays have the expected number of dimensions...\n\tK = ndims - M;\n\tfor ( i = 1; i < N; i++ ) {\n\t\tif ( arr[ i ].shape.length !== K ) {\n\t\t\tthrow new Error( format( 'invalid argument. Arrays which are not being reduced must have the same number of non-reduced dimensions. Input array shape: [%s]. Number of non-reduced dimensions: %d. Array shape: [%s] (index: %d).', join( shx, ',' ), K, join( arr[ i ].shape, ',' ), i ) );\n\t\t}\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( K === 0 ) {\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ K ]( fcn, arr, opts );\n\t\t}\n\t\treturn UNARY[ K ]( fcn, arr, opts );\n\t}\n\t// Resolve the non-reduced (\"loop\") dimensions and associated strides:\n\tldims = indicesComplement( shx.length, d );\n\ttmp = takeIndexed2( shx, x.strides, ldims );\n\tshl = tmp[ 0 ];\n\tsl = tmp[ 1 ];\n\n\t// Resolve the reduced (\"core\") dimensions and associated strides:\n\ttmp = takeIndexed2( shx, x.strides, d );\n\tshc = tmp[ 0 ];\n\tsc = tmp[ 1 ];\n\n\t// Verify that the provided arrays have the same loop dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < K; i++ ) {\n\t\ts = shl[ i ];\n\t\tfor ( j = 1; j < N; j++ ) {\n\t\t\tif ( s !== arr[ j ].shape[ i ] ) {\n\t\t\t\tthrow new Error( format( 'invalid argument. Non-reduced dimensions must be consistent across all provided arrays. Input array shape: [%s]. Non-reduced dimension indices: [%s]. Non-reduced dimensions: [%s]. Array shape: [%s] (index: %d).', join( shx, ',' ), join( ldims, ',' ), join( shl, ',' ), join( arr[ j ].shape, ',' ), j ) );\n\t\t\t}\n\t\t}\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= s;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( s === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided empty ndarrays...\n\tif ( len === 0 || ( shc.length && numel( shc ) === 0 ) ) {\n\t\treturn;\n\t}\n\t// Initialize ndarray-like objects for representing sub-array views...\n\tviews = [\n\t\t{\n\t\t\t'dtype': x.dtype,\n\t\t\t'data': x.data,\n\t\t\t'shape': shc,\n\t\t\t'strides': sc,\n\t\t\t'offset': x.offset,\n\t\t\t'order': x.order\n\t\t}\n\t];\n\tinitializeViews( arr, views );\n\n\t// Determine whether we only have one loop dimension and can thus readily perform one-dimensional iteration...\n\tif ( K === 1 ) {\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ K ]( fcn, arr, views, sl, opts );\n\t\t}\n\t\treturn UNARY[ K ]( fcn, arr, views, sl, opts );\n\t}\n\tsy = y.strides;\n\n\t// Determine whether the loop dimensions have only **one** non-singleton dimension (e.g., shape=[10,1,1,1]) so that we can treat loop iteration as being equivalent to one-dimensional iteration...\n\tif ( ns === K-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < K; i++ ) {\n\t\t\tif ( shl[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ty.shape = [ shl[i] ];\n\t\tfor ( j = 0; j < N; j++ ) {\n\t\t\tarr[ j ].strides = [ arr[j].strides[i] ];\n\t\t}\n\t\tsl = [ sl[i] ];\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ 1 ]( fcn, arr, views, sl, opts );\n\t\t}\n\t\treturn UNARY[ 1 ]( fcn, arr, views, sl, opts );\n\t}\n\tiox = iterationOrder( sl ); // +/-1\n\tioy = iterationOrder( sy ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tord = strides2order( sl );\n\tif ( iox !== 0 && ioy !== 0 && ord === strides2order( sy ) && K <= MAX_DIMS ) { // eslint-disable-line max-len\n\t\t// So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides) and the memory layouts are the same, we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ K ]( fcn, arr, views, sl, ord === 1, opts );\n\t\t}\n\t\treturn UNARY[ K ]( fcn, arr, views, sl, ord === 1, opts );\n\t}\n\t// At this point, we're either dealing with non-contiguous n-dimensional arrays, high dimensional n-dimensional arrays, and/or arrays having differing memory layouts, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( K <= MAX_DIMS ) {\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_UNARY[ K-2 ]( fcn, arr, views, sl, opts );\n\t\t}\n\t\treturn BLOCKED_UNARY[ K-2 ]( fcn, arr, views, sl, opts );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( y.accessorProtocol ) {\n\t\treturn accessorunarynd( fcn, arr, views, sl, opts );\n\t}\n\tunarynd( fcn, arr, views, sl, opts );\n}\n\n\n// EXPORTS //\n\nexport default unaryReduceSubarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport without from '@stdlib/array-base-without';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 1 );\n*\n* // Define the array shapes:\n* var xsh = [ 2, 2 ];\n* var ysh = [];\n*\n* // Define the array strides:\n* var sx = [ 6, 1 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unary0d( base, [ x, y ], {} );\n*\n* var v = y.data;\n* // returns [ true ]\n*/\nfunction unary0d( fcn, arrays, opts ) {\n\tarrays[1].data[ arrays[1].offset ] = fcn( without( arrays, 1 ), opts );\n}\n\n\n// EXPORTS //\n\nexport default unary0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary1d( base, [ x, y ], views, [ 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ true, false, true ]\n*/\nfunction unary1d( fcn, arrays, views, strides, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar sh;\n\tvar S0;\n\tvar iv;\n\tvar i0;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tS0 = sh[ 0 ];\n\tdv0 = [ strides[0] ];\n\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\tdv0.push( arrays[i].strides[0] );\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tsetViewOffsets( views, iv );\n\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\tincrementOffsets( iv, dv0 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary2d( base, [ x, y ], views, [ 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction unary2d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdv0 = [ strides[1] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[0] - ( S0*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[1] );\n\t\t\tdv1.push( sv[0] - ( S0*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tsetViewOffsets( views, iv );\n\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\tincrementOffsets( iv, dv0 );\n\t\t}\n\t\tincrementOffsets( iv, dv1 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary3d( base, [ x, y ], views, [ 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, false, true ] ] ]\n*/\nfunction unary3d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdv0 = [ strides[2] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[2] ) ];\n\t\tdv2 = [ strides[0] - ( S1*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[2] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[2] ) );\n\t\t\tdv2.push( sv[0] - ( S1*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv1 );\n\t\t}\n\t\tincrementOffsets( iv, dv2 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary4d( base, [ x, y ], views, [ 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ true, false, true ] ] ] ]\n*/\nfunction unary4d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdv0 = [ strides[3] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[2] - ( S0*strides[3] ) ];\n\t\tdv2 = [ strides[1] - ( S1*strides[2] ) ];\n\t\tdv3 = [ strides[0] - ( S2*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[3] );\n\t\t\tdv1.push( sv[2] - ( S0*sv[3] ) );\n\t\t\tdv2.push( sv[1] - ( S1*sv[2] ) );\n\t\t\tdv3.push( sv[0] - ( S2*sv[1]) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv2 );\n\t\t}\n\t\tincrementOffsets( iv, dv3 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary5d( base, [ x, y ], views, [ 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ true, false, true ] ] ] ] ]\n*/\nfunction unary5d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdv0 = [ strides[4] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[3] - ( S0*strides[4] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[3] ) ];\n\t\tdv3 = [ strides[1] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[0] - ( S3*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[4] );\n\t\t\tdv1.push( sv[3] - ( S0*sv[4] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[3] ) );\n\t\t\tdv3.push( sv[1] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[0] - ( S3*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv3 );\n\t\t}\n\t\tincrementOffsets( iv, dv4 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary6d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ true, false, true ] ] ] ] ] ]\n*/\nfunction unary6d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdv0 = [ strides[5] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[4] - ( S0*strides[5] ) ];\n\t\tdv2 = [ strides[3] - ( S1*strides[4] ) ];\n\t\tdv3 = [ strides[2] - ( S2*strides[3] ) ];\n\t\tdv4 = [ strides[1] - ( S3*strides[2] ) ];\n\t\tdv5 = [ strides[0] - ( S4*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[5] );\n\t\t\tdv1.push( sv[4] - ( S0*sv[5] ) );\n\t\t\tdv2.push( sv[3] - ( S1*sv[4] ) );\n\t\t\tdv3.push( sv[2] - ( S2*sv[3] ) );\n\t\t\tdv4.push( sv[1] - ( S3*sv[2] ) );\n\t\t\tdv5.push( sv[0] - ( S4*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv4 );\n\t\t}\n\t\tincrementOffsets( iv, dv5 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary7d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ]\n*/\nfunction unary7d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdv0 = [ strides[6] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[5] - ( S0*strides[6] ) ];\n\t\tdv2 = [ strides[4] - ( S1*strides[5] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[4] ) ];\n\t\tdv4 = [ strides[2] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[1] - ( S4*strides[2] ) ];\n\t\tdv6 = [ strides[0] - ( S5*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[6] );\n\t\t\tdv1.push( sv[5] - ( S0*sv[6] ) );\n\t\t\tdv2.push( sv[4] - ( S1*sv[5] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[4] ) );\n\t\t\tdv4.push( sv[2] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[1] - ( S4*sv[2] ) );\n\t\t\tdv6.push( sv[0] - ( S5*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv5 );\n\t\t}\n\t\tincrementOffsets( iv, dv6 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary8d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ]\n*/\nfunction unary8d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdv0 = [ strides[7] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[6] - ( S0*strides[7] ) ];\n\t\tdv2 = [ strides[5] - ( S1*strides[6] ) ];\n\t\tdv3 = [ strides[4] - ( S2*strides[5] ) ];\n\t\tdv4 = [ strides[3] - ( S3*strides[4] ) ];\n\t\tdv5 = [ strides[2] - ( S4*strides[3] ) ];\n\t\tdv6 = [ strides[1] - ( S5*strides[2] ) ];\n\t\tdv7 = [ strides[0] - ( S6*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[7] );\n\t\t\tdv1.push( sv[6] - ( S0*sv[7] ) );\n\t\t\tdv2.push( sv[5] - ( S1*sv[6] ) );\n\t\t\tdv3.push( sv[4] - ( S2*sv[5] ) );\n\t\t\tdv4.push( sv[3] - ( S3*sv[4] ) );\n\t\t\tdv5.push( sv[2] - ( S4*sv[3] ) );\n\t\t\tdv6.push( sv[1] - ( S5*sv[2] ) );\n\t\t\tdv7.push( sv[0] - ( S6*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv6 );\n\t\t}\n\t\tincrementOffsets( iv, dv7 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary9d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ]\n*/\nfunction unary9d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdv0 = [ strides[8] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[7] - ( S0*strides[8] ) ];\n\t\tdv2 = [ strides[6] - ( S1*strides[7] ) ];\n\t\tdv3 = [ strides[5] - ( S2*strides[6] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[5] ) ];\n\t\tdv5 = [ strides[3] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[2] - ( S5*strides[3] ) ];\n\t\tdv7 = [ strides[1] - ( S6*strides[2] ) ];\n\t\tdv8 = [ strides[0] - ( S7*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[8] );\n\t\t\tdv1.push( sv[7] - ( S0*sv[8] ) );\n\t\t\tdv2.push( sv[6] - ( S1*sv[7] ) );\n\t\t\tdv3.push( sv[5] - ( S2*sv[6] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[5] ) );\n\t\t\tdv5.push( sv[3] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[2] - ( S5*sv[3] ) );\n\t\t\tdv7.push( sv[1] - ( S6*sv[2] ) );\n\t\t\tdv8.push( sv[0] - ( S7*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ];\n\t\tdv8 = [ strides[8] - ( S7*strides[7] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t\tdv8.push( sv[8] - ( S7*sv[7] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv7 );\n\t\t}\n\t\tincrementOffsets( iv, dv8 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary10d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ] ]\n*/\nfunction unary10d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar dv9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdv0 = [ strides[9] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[8] - ( S0*strides[9] ) ];\n\t\tdv2 = [ strides[7] - ( S1*strides[8] ) ];\n\t\tdv3 = [ strides[6] - ( S2*strides[7] ) ];\n\t\tdv4 = [ strides[5] - ( S3*strides[6] ) ];\n\t\tdv5 = [ strides[4] - ( S4*strides[5] ) ];\n\t\tdv6 = [ strides[3] - ( S5*strides[4] ) ];\n\t\tdv7 = [ strides[2] - ( S6*strides[3] ) ];\n\t\tdv8 = [ strides[1] - ( S7*strides[2] ) ];\n\t\tdv9 = [ strides[0] - ( S8*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[9] );\n\t\t\tdv1.push( sv[8] - ( S0*sv[9] ) );\n\t\t\tdv2.push( sv[7] - ( S1*sv[8] ) );\n\t\t\tdv3.push( sv[6] - ( S2*sv[7] ) );\n\t\t\tdv4.push( sv[5] - ( S3*sv[6] ) );\n\t\t\tdv5.push( sv[4] - ( S4*sv[5] ) );\n\t\t\tdv6.push( sv[3] - ( S5*sv[4] ) );\n\t\t\tdv7.push( sv[2] - ( S6*sv[3] ) );\n\t\t\tdv8.push( sv[1] - ( S7*sv[2] ) );\n\t\t\tdv9.push( sv[0] - ( S8*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ];\n\t\tdv8 = [ strides[8] - ( S7*strides[7] ) ];\n\t\tdv9 = [ strides[9] - ( S8*strides[8] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t\tdv8.push( sv[8] - ( S7*sv[7] ) );\n\t\t\tdv9.push( sv[9] - ( S8*sv[8] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv8 );\n\t\t}\n\t\tincrementOffsets( iv, dv9 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport without from '@stdlib/array-base-without';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 1 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 2, 2 ];\n* var ysh = [];\n*\n* // Define the array strides:\n* var sx = [ 6, 1 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Perform a reduction:\n* unary0d( base, [ x, y ], {} );\n*\n* var v = y.data.get( 0 );\n* // returns true\n*/\nfunction unary0d( fcn, arrays, opts ) {\n\tvar y = arrays[ 1 ];\n\ty.accessors[ 1 ]( y.data, y.offset, fcn( without( arrays, 1 ), opts ) );\n}\n\n\n// EXPORTS //\n\nexport default unary0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary1d( base, [ x, y ], views, [ 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ true, false, true ]\n*/\nfunction unary1d( fcn, arrays, views, strides, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar sh;\n\tvar S0;\n\tvar iv;\n\tvar i0;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = sh[ 0 ];\n\tdv0 = [ strides[0] ];\n\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\tdv0.push( arrays[i].strides[0] );\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tsetViewOffsets( views, iv );\n\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\tincrementOffsets( iv, dv0 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary2d( base, [ x, y ], views, [ 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction unary2d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdv0 = [ strides[1] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[0] - ( S0*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[1] );\n\t\t\tdv1.push( sv[0] - ( S0*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tsetViewOffsets( views, iv );\n\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\tincrementOffsets( iv, dv0 );\n\t\t}\n\t\tincrementOffsets( iv, dv1 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary3d( base, [ x, y ], views, [ 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, false, true ] ] ]\n*/\nfunction unary3d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdv0 = [ strides[2] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[2] ) ];\n\t\tdv2 = [ strides[0] - ( S1*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[2] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[2] ) );\n\t\t\tdv2.push( sv[0] - ( S1*sv[1] ) );\n\t\t}\n\t} else {\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv1 );\n\t\t}\n\t\tincrementOffsets( iv, dv2 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary4d( base, [ x, y ], views, [ 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ true, false, true ] ] ] ]\n*/\nfunction unary4d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdv0 = [ strides[3] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[2] - ( S0*strides[3] ) ];\n\t\tdv2 = [ strides[1] - ( S1*strides[2] ) ];\n\t\tdv3 = [ strides[0] - ( S2*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[3] );\n\t\t\tdv1.push( sv[2] - ( S0*sv[3] ) );\n\t\t\tdv2.push( sv[1] - ( S1*sv[2] ) );\n\t\t\tdv3.push( sv[0] - ( S2*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2]) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv2 );\n\t\t}\n\t\tincrementOffsets( iv, dv3 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary5d( base, [ x, y ], views, [ 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ true, false, true ] ] ] ] ]\n*/\nfunction unary5d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdv0 = [ strides[4] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[3] - ( S0*strides[4] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[3] ) ];\n\t\tdv3 = [ strides[1] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[0] - ( S3*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[4] );\n\t\t\tdv1.push( sv[3] - ( S0*sv[4] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[3] ) );\n\t\t\tdv3.push( sv[1] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[0] - ( S3*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv3 );\n\t\t}\n\t\tincrementOffsets( iv, dv4 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary6d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ true, false, true ] ] ] ] ] ]\n*/\nfunction unary6d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdv0 = [ strides[5] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[4] - ( S0*strides[5] ) ];\n\t\tdv2 = [ strides[3] - ( S1*strides[4] ) ];\n\t\tdv3 = [ strides[2] - ( S2*strides[3] ) ];\n\t\tdv4 = [ strides[1] - ( S3*strides[2] ) ];\n\t\tdv5 = [ strides[0] - ( S4*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[5] );\n\t\t\tdv1.push( sv[4] - ( S0*sv[5] ) );\n\t\t\tdv2.push( sv[3] - ( S1*sv[4] ) );\n\t\t\tdv3.push( sv[2] - ( S2*sv[3] ) );\n\t\t\tdv4.push( sv[1] - ( S3*sv[2] ) );\n\t\t\tdv5.push( sv[0] - ( S4*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv4 );\n\t\t}\n\t\tincrementOffsets( iv, dv5 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary7d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ]\n*/\nfunction unary7d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdv0 = [ strides[6] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[5] - ( S0*strides[6] ) ];\n\t\tdv2 = [ strides[4] - ( S1*strides[5] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[4] ) ];\n\t\tdv4 = [ strides[2] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[1] - ( S4*strides[2] ) ];\n\t\tdv6 = [ strides[0] - ( S5*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[6] );\n\t\t\tdv1.push( sv[5] - ( S0*sv[6] ) );\n\t\t\tdv2.push( sv[4] - ( S1*sv[5] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[4] ) );\n\t\t\tdv4.push( sv[2] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[1] - ( S4*sv[2] ) );\n\t\t\tdv6.push( sv[0] - ( S5*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv5 );\n\t\t}\n\t\tincrementOffsets( iv, dv6 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary8d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ]\n*/\nfunction unary8d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdv0 = [ strides[7] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[6] - ( S0*strides[7] ) ];\n\t\tdv2 = [ strides[5] - ( S1*strides[6] ) ];\n\t\tdv3 = [ strides[4] - ( S2*strides[5] ) ];\n\t\tdv4 = [ strides[3] - ( S3*strides[4] ) ];\n\t\tdv5 = [ strides[2] - ( S4*strides[3] ) ];\n\t\tdv6 = [ strides[1] - ( S5*strides[2] ) ];\n\t\tdv7 = [ strides[0] - ( S6*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[7] );\n\t\t\tdv1.push( sv[6] - ( S0*sv[7] ) );\n\t\t\tdv2.push( sv[5] - ( S1*sv[6] ) );\n\t\t\tdv3.push( sv[4] - ( S2*sv[5] ) );\n\t\t\tdv4.push( sv[3] - ( S3*sv[4] ) );\n\t\t\tdv5.push( sv[2] - ( S4*sv[3] ) );\n\t\t\tdv6.push( sv[1] - ( S5*sv[2] ) );\n\t\t\tdv7.push( sv[0] - ( S6*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv6 );\n\t\t}\n\t\tincrementOffsets( iv, dv7 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary9d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ]\n*/\nfunction unary9d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdv0 = [ strides[8] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[7] - ( S0*strides[8] ) ];\n\t\tdv2 = [ strides[6] - ( S1*strides[7] ) ];\n\t\tdv3 = [ strides[5] - ( S2*strides[6] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[5] ) ];\n\t\tdv5 = [ strides[3] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[2] - ( S5*strides[3] ) ];\n\t\tdv7 = [ strides[1] - ( S6*strides[2] ) ];\n\t\tdv8 = [ strides[0] - ( S7*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[8] );\n\t\t\tdv1.push( sv[7] - ( S0*sv[8] ) );\n\t\t\tdv2.push( sv[6] - ( S1*sv[7] ) );\n\t\t\tdv3.push( sv[5] - ( S2*sv[6] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[5] ) );\n\t\t\tdv5.push( sv[3] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[2] - ( S5*sv[3] ) );\n\t\t\tdv7.push( sv[1] - ( S6*sv[2] ) );\n\t\t\tdv8.push( sv[0] - ( S7*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ];\n\t\tdv8 = [ strides[8] - ( S7*strides[7] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t\tdv8.push( sv[8] - ( S7*sv[7] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv7 );\n\t\t}\n\t\tincrementOffsets( iv, dv8 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary10d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ] ]\n*/\nfunction unary10d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar dv9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdv0 = [ strides[9] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[8] - ( S0*strides[9] ) ];\n\t\tdv2 = [ strides[7] - ( S1*strides[8] ) ];\n\t\tdv3 = [ strides[6] - ( S2*strides[7] ) ];\n\t\tdv4 = [ strides[5] - ( S3*strides[6] ) ];\n\t\tdv5 = [ strides[4] - ( S4*strides[5] ) ];\n\t\tdv6 = [ strides[3] - ( S5*strides[4] ) ];\n\t\tdv7 = [ strides[2] - ( S6*strides[3] ) ];\n\t\tdv8 = [ strides[1] - ( S7*strides[2] ) ];\n\t\tdv9 = [ strides[0] - ( S8*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[9] );\n\t\t\tdv1.push( sv[8] - ( S0*sv[9] ) );\n\t\t\tdv2.push( sv[7] - ( S1*sv[8] ) );\n\t\t\tdv3.push( sv[6] - ( S2*sv[7] ) );\n\t\t\tdv4.push( sv[5] - ( S3*sv[6] ) );\n\t\t\tdv5.push( sv[4] - ( S4*sv[5] ) );\n\t\t\tdv6.push( sv[3] - ( S5*sv[4] ) );\n\t\t\tdv7.push( sv[2] - ( S6*sv[3] ) );\n\t\t\tdv8.push( sv[1] - ( S7*sv[2] ) );\n\t\t\tdv9.push( sv[0] - ( S8*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ];\n\t\tdv8 = [ strides[8] - ( S7*strides[7] ) ];\n\t\tdv9 = [ strides[9] - ( S8*strides[8] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t\tdv8.push( sv[8] - ( S7*sv[7] ) );\n\t\t\tdv9.push( sv[9] - ( S8*sv[8] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv8 );\n\t\t}\n\t\tincrementOffsets( iv, dv9 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary2d( base, [ x, y ], views, [ 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction blockedunary2d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar ov1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tdv1 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov1[ k ] = ov[k] + ( j1*sv[k][1] );\n\t\t}\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t}\n\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary3d( base, [ x, y ], views, [ 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, false, true ] ] ]\n*/\nfunction blockedunary3d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar ov1;\n\tvar ov2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov2[ k ] = ov[k] + ( j2*sv[k][2] );\n\t\t}\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t}\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t}\n\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary4d( base, [ x, y ], views, [ 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ true, false, true ] ] ] ]\n*/\nfunction blockedunary4d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov3[ k ] = ov[k] + ( j3*sv[k][3] );\n\t\t}\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t}\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t}\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t}\n\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary5d( base, [ x, y ], views, [ 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ true, false, true ] ] ] ] ]\n*/\nfunction blockedunary5d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov4[ k ] = ov[k] + ( j4*sv[k][4] );\n\t\t}\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t}\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t}\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary6d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ true, false, true ] ] ] ] ] ]\n*/\nfunction blockedunary6d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov5[ k ] = ov[k] + ( j5*sv[k][5] );\n\t\t}\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t}\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t}\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary7d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ]\n*/\nfunction blockedunary7d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov6[ k ] = ov[k] + ( j6*sv[k][6] );\n\t\t}\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t}\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t}\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary8d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary8d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov7[ k ] = ov[k] + ( j7*sv[k][7] );\n\t\t}\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t}\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t}\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary9d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary9d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar ov8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tov8 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tdv8 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov8[ k ] = ov[k] + ( j8*sv[k][8] );\n\t\t}\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv8 = sv[k][8] - ( s7*sv[k][7] );\n\t\t\t\tov7[ k ] = ov8[k] + ( j7*sv[k][7] );\n\t\t\t}\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t\t}\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv8 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary10d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary10d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar dv9;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar ov8;\n\tvar ov9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tov8 = zeros( N );\n\tov9 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tdv8 = zeros( N );\n\tdv9 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov9[ k ] = ov[k] + ( j9*sv[k][9] );\n\t\t}\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv9 = sv[k][9] - ( s8*sv[k][8] );\n\t\t\t\tov8[ k ] = ov9[k] + ( j8*sv[k][8] );\n\t\t\t}\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv8 = sv[k][8] - ( s7*sv[k][7] );\n\t\t\t\t\tov7[ k ] = ov8[k] + ( j7*sv[k][7] );\n\t\t\t\t}\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv8 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv9 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary2d( base, [ x, y ], views, [ 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction blockedunary2d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar ov1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tdv1 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov1[ k ] = ov[k] + ( j1*sv[k][1] );\n\t\t}\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t}\n\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary3d( base, [ x, y ], views, [ 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, false, true ] ] ]\n*/\nfunction blockedunary3d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar ov1;\n\tvar ov2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov2[ k ] = ov[k] + ( j2*sv[k][2] );\n\t\t}\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t}\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t}\n\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary4d( base, [ x, y ], views, [ 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ true, false, true ] ] ] ]\n*/\nfunction blockedunary4d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov3[ k ] = ov[k] + ( j3*sv[k][3] );\n\t\t}\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t}\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t}\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t}\n\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary5d( base, [ x, y ], views, [ 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ true, false, true ] ] ] ] ]\n*/\nfunction blockedunary5d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov4[ k ] = ov[k] + ( j4*sv[k][4] );\n\t\t}\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t}\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t}\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary6d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ true, false, true ] ] ] ] ] ]\n*/\nfunction blockedunary6d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov5[ k ] = ov[k] + ( j5*sv[k][5] );\n\t\t}\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t}\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t}\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary7d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ]\n*/\nfunction blockedunary7d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov6[ k ] = ov[k] + ( j6*sv[k][6] );\n\t\t}\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t}\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t}\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary8d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary8d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov7[ k ] = ov[k] + ( j7*sv[k][7] );\n\t\t}\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t}\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t}\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary9d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary9d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar ov8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tov8 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tdv8 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov8[ k ] = ov[k] + ( j8*sv[k][8] );\n\t\t}\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv8 = sv[k][8] - ( s7*sv[k][7] );\n\t\t\t\tov7[ k ] = ov8[k] + ( j7*sv[k][7] );\n\t\t\t}\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t\t}\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv8 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary10d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary10d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar dv9;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar ov8;\n\tvar ov9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tov8 = zeros( N );\n\tov9 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tdv8 = zeros( N );\n\tdv9 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov9[ k ] = ov[k] + ( j9*sv[k][9] );\n\t\t}\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv9 = sv[k][9] - ( s8*sv[k][8] );\n\t\t\t\tov8[ k ] = ov9[k] + ( j8*sv[k][8] );\n\t\t\t}\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv8 = sv[k][8] - ( s7*sv[k][7] );\n\t\t\t\t\tov7[ k ] = ov8[k] + ( j7*sv[k][7] );\n\t\t\t\t}\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv8 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv9 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Initialize ndarray-like objects for representing zero-dimensional sub-array views of ancillary ndarray arguments.\n*\n* ## Notes\n*\n* - This function ignores the first two ndarray-like objects, which are assumed to be the input and output ndarray, respectively.\n* - This function mutates the provided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - list of ndarray-like objects\n* @param {Array} out - output array\n* @returns {Array} output array\n*/\nfunction initializeViews( arrays, out ) {\n\tvar v;\n\tvar i;\n\n\tfor ( i = 2; i < arrays.length; i++ ) {\n\t\tv = arrays[ i ];\n\t\tout.push({\n\t\t\t'dtype': v.dtype,\n\t\t\t'data': v.data,\n\t\t\t'shape': [],\n\t\t\t'strides': [ 0 ],\n\t\t\t'offset': v.offset,\n\t\t\t'order': v.order\n\t\t});\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default initializeViews;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Perform a reduction over a list of specified dimensions in an input ndarray and assign results to a provided output ndarray.\n*\n* @module @stdlib/ndarray-base-unary-reduce-subarray\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import every from '@stdlib/ndarray-base-every';\n* import unaryReduceSubarray from '@stdlib/ndarray-base-unary-reduce-subarray';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unaryReduceSubarray( every, [ x, y ], [ 2, 3 ] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n* import unaryReduceSubarray from '@stdlib/ndarray-base-unary-reduce-subarray';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Create a function for performing a reduction over subarrays:\n* var every = unaryReduceSubarray.factory( base );\n* // returns \n*\n* // Perform a reduction:\n* every( [ x, y ], [ 2, 3 ] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport factory from './factory.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default main;\n\n// exports: { \"factory\": \"main.factory\" }\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFunction from '@stdlib/assert-is-function';\nimport format from '@stdlib/string-format';\nimport reduce from './main.js';\n\n\n// MAIN //\n\n/**\n* Returns a function for performing a reduction over a list of specified dimensions in an input ndarray and assigning results to a provided output ndarray.\n*\n* @param {Function} fcn - reduction function\n* @throws {TypeError} first argument must be a function\n* @returns {Function} function for performing a reduction\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Create a function for performing a reduction over subarrays:\n* var every = factory( base );\n* // returns \n*\n* // Perform a reduction:\n* every( [ x, y ], [ 2, 3 ] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction factory( fcn ) {\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\treturn reducer;\n\n\t/**\n\t* Performs a reduction over a list of specified dimensions in an input ndarray and assigns results to a provided output ndarray.\n\t*\n\t* @private\n\t* @param {ArrayLikeObject} arrays - array-like object containing ndarrays\n\t* @param {IntegerArray} dims - list of dimensions over which to perform a reduction\n\t* @param {Options} [options] - function options\n\t* @returns {void}\n\t*/\n\tfunction reducer( arrays, dims, options ) {\n\t\tvar opts;\n\t\tif ( arguments.length > 2 ) {\n\t\t\topts = options;\n\t\t} else {\n\t\t\topts = {};\n\t\t}\n\t\treturn reduce( fcn, arrays, dims, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar C64_BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\nvar C128_BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplexTypedArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplexTypedArray( [] );\n* // returns false\n*/\nfunction isComplexTypedArray( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex-typed-array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t(\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\t\t\tvalue.BYTES_PER_ELEMENT === C128_BYTES_PER_ELEMENT\n\t\t\t) ||\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\t\t\tvalue.BYTES_PER_ELEMENT === C64_BYTES_PER_ELEMENT\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexTypedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 1; // 1 bytes per uint8\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `BooleanArray`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `BooleanArray`\n*\n* @example\n* import BooleanArray from '@stdlib/array-bool';\n*\n* var bool = isBooleanArray( new BooleanArray( 10 ) );\n* // returns true\n*\n* bool = isBooleanArray( [] );\n* // returns false\n*/\nfunction isBooleanArray( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `BooleanArray` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-booleanarray`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'BooleanArray' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBooleanArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {PositiveInteger} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\nfunction gscal( N, alpha, x, stride ) {\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0|| alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i += 1 ) {\n\t\t\t\tx[ i ] *= alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tx[ i ] *= alpha;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nexport default gscal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport copy from '@stdlib/array-base-copy-indexed';\nimport take from '@stdlib/array-base-take-indexed';\nimport sort2ins from './sort2ins.js';\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: ndarray strides sorted in loop order.\n* - **idx**: dimension indices sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n*\n* var o = loopOrder( sh, sx );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var idx = o.idx;\n* // returns [ 2, 1, 0 ]\n*/\nfunction loopOrder( sh, sx ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape based on the sorted array strides:\n\tsh = take( sh, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'idx': idx\n\t};\n}\n\n\n// EXPORTS //\n\nexport default loopOrder;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default sort2ins;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to multiply `x` by a constant.\n*\n* @module @stdlib/blas-base-gscal\n*\n* @example\n* import gscal from '@stdlib/blas-base-gscal';\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*\n* @example\n* import gscal from '@stdlib/blas-base-gscal';\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport ndarray from './ndarray.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];\n*\n* gscal( 3, 5.0, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]\n*/\nfunction gscal( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] *= alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] *= alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nexport default gscal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport defaults from './defaults.js';\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = nullaryBlockSize( 'float64' );\n* // returns \n*/\nfunction nullaryBlockSize( dtypeX ) {\n\tvar nbx = bytesPerElement( dtypeX );\n\tif ( nbx === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default nullaryBlockSize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthynd( x );\n* // returns 4\n*/\nfunction countTruthynd( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar get;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tif ( get( xbuf, ix ) ) {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthynd( x );\n* // returns 4\n*/\nfunction countTruthynd( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthynd( x );\n* // returns 4\n*/\nfunction countTruthynd( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tif ( xbuf[ ix ] ) {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexArray from '@stdlib/array-base-assert-is-complex-typed-array';\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\nimport ndarray2object from '@stdlib/ndarray-base-ndarraylike2object';\nimport reinterpretComplex from '@stdlib/strided-base-reinterpret-complex';\nimport reinterpretBoolean from '@stdlib/strided-base-reinterpret-boolean';\nimport gscal from '@stdlib/blas-base-gscal';\nimport blockedaccessorcount2d from './2d_blocked_accessors.js';\nimport blockedaccessorcount3d from './3d_blocked_accessors.js';\nimport blockedaccessorcount4d from './4d_blocked_accessors.js';\nimport blockedaccessorcount5d from './5d_blocked_accessors.js';\nimport blockedaccessorcount6d from './6d_blocked_accessors.js';\nimport blockedaccessorcount7d from './7d_blocked_accessors.js';\nimport blockedaccessorcount8d from './8d_blocked_accessors.js';\nimport blockedaccessorcount9d from './9d_blocked_accessors.js';\nimport blockedaccessorcount10d from './10d_blocked_accessors.js';\nimport blockedcomplexcount2d from './2d_blocked_complex.js';\nimport blockedcomplexcount3d from './3d_blocked_complex.js';\nimport blockedcomplexcount4d from './4d_blocked_complex.js';\nimport blockedcomplexcount5d from './5d_blocked_complex.js';\nimport blockedcomplexcount6d from './6d_blocked_complex.js';\nimport blockedcomplexcount7d from './7d_blocked_complex.js';\nimport blockedcomplexcount8d from './8d_blocked_complex.js';\nimport blockedcomplexcount9d from './9d_blocked_complex.js';\nimport blockedcomplexcount10d from './10d_blocked_complex.js';\nimport blockedcount2d from './2d_blocked.js';\nimport blockedcount3d from './3d_blocked.js';\nimport blockedcount4d from './4d_blocked.js';\nimport blockedcount5d from './5d_blocked.js';\nimport blockedcount6d from './6d_blocked.js';\nimport blockedcount7d from './7d_blocked.js';\nimport blockedcount8d from './8d_blocked.js';\nimport blockedcount9d from './9d_blocked.js';\nimport blockedcount10d from './10d_blocked.js';\nimport accessorcount0d from './0d_accessors.js';\nimport accessorcount1d from './1d_accessors.js';\nimport accessorcount2d from './2d_accessors.js';\nimport accessorcount3d from './3d_accessors.js';\nimport accessorcount4d from './4d_accessors.js';\nimport accessorcount5d from './5d_accessors.js';\nimport accessorcount6d from './6d_accessors.js';\nimport accessorcount7d from './7d_accessors.js';\nimport accessorcount8d from './8d_accessors.js';\nimport accessorcount9d from './9d_accessors.js';\nimport accessorcount10d from './10d_accessors.js';\nimport accessorcountnd from './nd_accessors.js';\nimport complexcount0d from './0d_complex.js';\nimport complexcount1d from './1d_complex.js';\nimport complexcount2d from './2d_complex.js';\nimport complexcount3d from './3d_complex.js';\nimport complexcount4d from './4d_complex.js';\nimport complexcount5d from './5d_complex.js';\nimport complexcount6d from './6d_complex.js';\nimport complexcount7d from './7d_complex.js';\nimport complexcount8d from './8d_complex.js';\nimport complexcount9d from './9d_complex.js';\nimport complexcount10d from './10d_complex.js';\nimport complexcountnd from './nd_complex.js';\nimport count0d from './0d.js';\nimport count1d from './1d.js';\nimport count2d from './2d.js';\nimport count3d from './3d.js';\nimport count4d from './4d.js';\nimport count5d from './5d.js';\nimport count6d from './6d.js';\nimport count7d from './7d.js';\nimport count8d from './8d.js';\nimport count9d from './9d.js';\nimport count10d from './10d.js';\nimport countnd from './nd.js';\n\n\n// VARIABLES //\n\nvar COUNT = [\n\tcount0d,\n\tcount1d,\n\tcount2d,\n\tcount3d,\n\tcount4d,\n\tcount5d,\n\tcount6d,\n\tcount7d,\n\tcount8d,\n\tcount9d,\n\tcount10d\n];\nvar ACCESSOR_COUNT = [\n\taccessorcount0d,\n\taccessorcount1d,\n\taccessorcount2d,\n\taccessorcount3d,\n\taccessorcount4d,\n\taccessorcount5d,\n\taccessorcount6d,\n\taccessorcount7d,\n\taccessorcount8d,\n\taccessorcount9d,\n\taccessorcount10d\n];\nvar COMPLEX_COUNT = [\n\tcomplexcount0d,\n\tcomplexcount1d,\n\tcomplexcount2d,\n\tcomplexcount3d,\n\tcomplexcount4d,\n\tcomplexcount5d,\n\tcomplexcount6d,\n\tcomplexcount7d,\n\tcomplexcount8d,\n\tcomplexcount9d,\n\tcomplexcount10d\n];\nvar BLOCKED_COUNT = [\n\tblockedcount2d, // 0\n\tblockedcount3d,\n\tblockedcount4d,\n\tblockedcount5d,\n\tblockedcount6d,\n\tblockedcount7d,\n\tblockedcount8d,\n\tblockedcount9d,\n\tblockedcount10d // 8\n];\nvar BLOCKED_ACCESSOR_COUNT = [\n\tblockedaccessorcount2d, // 0\n\tblockedaccessorcount3d,\n\tblockedaccessorcount4d,\n\tblockedaccessorcount5d,\n\tblockedaccessorcount6d,\n\tblockedaccessorcount7d,\n\tblockedaccessorcount8d,\n\tblockedaccessorcount9d,\n\tblockedaccessorcount10d // 8\n];\nvar BLOCKED_COMPLEX_COUNT = [\n\tblockedcomplexcount2d, // 0\n\tblockedcomplexcount3d,\n\tblockedcomplexcount4d,\n\tblockedcomplexcount5d,\n\tblockedcomplexcount6d,\n\tblockedcomplexcount7d,\n\tblockedcomplexcount8d,\n\tblockedcomplexcount9d,\n\tblockedcomplexcount10d // 8\n];\nvar MAX_DIMS = COUNT.length - 1;\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* ## Notes\n*\n* - A provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy( [ x ] );\n* // returns 6\n*/\nfunction countTruthy( arrays ) {\n\tvar isCmplx;\n\tvar ndims;\n\tvar xmmv;\n\tvar shx;\n\tvar iox;\n\tvar len;\n\tvar sx;\n\tvar ox;\n\tvar ns;\n\tvar x;\n\tvar d;\n\tvar i;\n\n\t// Unpack the ndarray and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\tshx = x.shape;\n\tndims = shx.length;\n\n\t// Check for known array types which can be reinterpreted for better iteration performance...\n\tif ( isBooleanArray( x.data ) ) {\n\t\tx.data = reinterpretBoolean( x.data, 0 );\n\t\tx.accessorProtocol = false;\n\t} else if ( isComplexArray( x.data ) ) {\n\t\tx.data = reinterpretComplex( x.data, 0 );\n\t\tx.accessorProtocol = false;\n\t\tx.strides = gscal( ndims, 2, x.strides, 1 );\n\t\tx.offset *= 2;\n\t\tisCmplx = true;\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_COUNT[ ndims ]( x );\n\t\t}\n\t\tif ( isCmplx ) {\n\t\t\treturn COMPLEX_COUNT[ ndims ]( x );\n\t\t}\n\t\treturn COUNT[ ndims ]( x );\n\t}\n\t// Compute the number of elements and the number of singleton dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( d === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided an empty ndarray...\n\tif ( len === 0 ) {\n\t\treturn true;\n\t}\n\t// Determine whether the ndarray is one-dimensional and thus readily translates to a one-dimensional strided array...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_COUNT[ ndims ]( x );\n\t\t}\n\t\tif ( isCmplx ) {\n\t\t\treturn COMPLEX_COUNT[ ndims ]( x );\n\t\t}\n\t\treturn COUNT[ ndims ]( x );\n\t}\n\tsx = x.strides;\n\n\t// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can treat an ndarray as being equivalent to a one-dimensional strided array...\n\tif ( ns === ndims-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( shx[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tx.shape = [ shx[i] ];\n\t\tx.strides = [ sx[i] ];\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_COUNT[ 1 ]( x );\n\t\t}\n\t\tif ( isCmplx ) {\n\t\t\treturn COMPLEX_COUNT[ 1 ]( x );\n\t\t}\n\t\treturn COUNT[ 1 ]( x );\n\t}\n\tiox = iterationOrder( sx ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 ) {\n\t\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\t\txmmv = minmaxViewBufferIndex( shx, sx, x.offset );\n\n\t\t// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...\n\t\tif ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+1 ) ) ) { // eslint-disable-line max-len\n\t\t\t// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...\n\t\t\tif ( iox === 1 ) {\n\t\t\t\tox = xmmv[ 0 ];\n\t\t\t} else {\n\t\t\t\tox = xmmv[ 1 ];\n\t\t\t}\n\t\t\tx.shape = [ len ];\n\t\t\tx.strides = [ ( isCmplx ) ? iox*2 : iox ];\n\t\t\tx.offset = ox;\n\t\t\tif ( x.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_COUNT[ 1 ]( x );\n\t\t\t}\n\t\t\tif ( isCmplx ) {\n\t\t\t\treturn COMPLEX_COUNT[ 1 ]( x );\n\t\t\t}\n\t\t\treturn COUNT[ 1 ]( x );\n\t\t}\n\t\t// The ndarray is non-contiguous, so we cannot directly use one-dimensional array functionality...\n\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_COUNT[ ndims ]( x );\n\t\t\t}\n\t\t\tif ( isCmplx ) {\n\t\t\t\treturn COMPLEX_COUNT[ ndims ]( x );\n\t\t\t}\n\t\t\treturn COUNT[ ndims ]( x );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// At this point, we're either dealing with a non-contiguous n-dimensional array or a high dimensional n-dimensional array, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_COUNT[ ndims-2 ]( x );\n\t\t}\n\t\tif ( isCmplx ) {\n\t\t\treturn BLOCKED_COMPLEX_COUNT[ ndims-2 ]( x );\n\t\t}\n\t\treturn BLOCKED_COUNT[ ndims-2 ]( x );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol ) {\n\t\treturn accessorcountnd( x );\n\t}\n\tif ( isCmplx ) {\n\t\treturn complexcountnd( x );\n\t}\n\treturn countnd( x );\n}\n\n\n// EXPORTS //\n\nexport default countTruthy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy0d( x );\n* // returns 1\n*/\nfunction countTruthy0d( x ) {\n\tif ( x.data[ x.offset ] ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy1d( x );\n* // returns 4\n*/\nfunction countTruthy1d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments:\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tif ( xbuf[ ix ] ) {\n\t\t\tcount += 1;\n\t\t}\n\t\tix += dx0;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy2d( x );\n* // returns 4\n*/\nfunction countTruthy2d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy3d( x );\n* // returns 6\n*/\nfunction countTruthy3d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\tcount += 1;\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy4d( x );\n* // returns 6\n*/\nfunction countTruthy4d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy5d( x );\n* // returns 6\n*/\nfunction countTruthy5d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy6d( x );\n* // returns 6\n*/\nfunction countTruthy6d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy7d( x );\n* // returns 6\n*/\nfunction countTruthy7d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy8d( x );\n* // returns 6\n*/\nfunction countTruthy8d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy9d( x );\n* // returns 6\n*/\nfunction countTruthy9d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy10d( x );\n* // returns 6\n*/\nfunction countTruthy10d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy0d( x );\n* // returns 1\n*/\nfunction countTruthy0d( x ) {\n\tif ( x.accessors[ 0 ]( x.data, x.offset ) ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy1d( x );\n* // returns 4\n*/\nfunction countTruthy1d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tif ( get( xbuf, ix ) ) {\n\t\t\tcount += 1;\n\t\t}\n\t\tix += dx0;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy2d( x );\n* // returns 4\n*/\nfunction countTruthy2d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy3d( x );\n* // returns 4\n*/\nfunction countTruthy3d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\tcount += 1;\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy4d( x );\n* // returns 4\n*/\nfunction countTruthy4d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy5d( x );\n* // returns 4\n*/\nfunction countTruthy5d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy6d( x );\n* // returns 4\n*/\nfunction countTruthy6d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy7d( x );\n* // returns 4\n*/\nfunction countTruthy7d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy8d( x );\n* // returns 4\n*/\nfunction countTruthy8d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy9d( x );\n* // returns 4\n*/\nfunction countTruthy9d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy10d( x );\n* // returns 4\n*/\nfunction countTruthy10d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy0d( x );\n* // returns 1\n*/\nfunction countTruthy0d( x ) {\n\tif ( x.data[ x.offset ] || x.data[ x.offset+1 ] ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy1d( x );\n* // returns 4\n*/\nfunction countTruthy1d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments:\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\tcount += 1;\n\t\t}\n\t\tix += dx0;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy2d( x );\n* // returns 4\n*/\nfunction countTruthy2d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy3d( x );\n* // returns 4\n*/\nfunction countTruthy3d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\tcount += 1;\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy4d( x );\n* // returns 4\n*/\nfunction countTruthy4d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy5d( x );\n* // returns 4\n*/\nfunction countTruthy5d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy6d( x );\n* // returns 4\n*/\nfunction countTruthy6d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy7d( x );\n* // returns 4\n*/\nfunction countTruthy7d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy8d( x );\n* // returns 4\n*/\nfunction countTruthy8d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy9d( x );\n* // returns 4\n*/\nfunction countTruthy9d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy10d( x );\n* // returns 4\n*/\nfunction countTruthy10d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy2d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy2d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy3d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy3d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy4d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy4d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy5d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy5d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy6d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy6d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy7d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy7d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy8d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy8d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy9d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy9d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy10d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy10d( x ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\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t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy2d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy2d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy3d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy3d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy4d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy4d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy5d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy5d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy6d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy6d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy7d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy7d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy8d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy8d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy9d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy9d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n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t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy10d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy10d( x ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8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t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy2d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy2d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy3d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy3d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy4d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy4d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy5d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy5d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy6d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy6d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy7d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy7d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy8d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy8d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy9d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy9d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy10d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy10d( x ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t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\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFunction from '@stdlib/assert-is-function';\n\n\n// MAIN //\n\nvar bool = isFunction( Object.assign ); // eslint-disable-line node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies own enumerable properties from source objects to a target object.\n*\n* ## Notes\n*\n* - If a property key is present in multiple sources, the property from the last source that defines the key prevails.\n* - The target object is mutated.\n*\n* @name assign\n* @type {Function}\n* @param {Object} target - target object\n* @param {...Object} source - source object(s)\n* @throws {TypeError} first argument must not be null or undefined\n* @returns {Object} target object\n*\n* @example\n* var obj1 = {\n* 'a': 'beep'\n* };\n* var obj2 = {\n* 'b': 'boop'\n* };\n*\n* var out = assign( obj1, obj2 );\n* // returns { 'a': 'beep', 'b': 'boop' }\n*/\nvar assign = Object.assign; // eslint-disable-line node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof Object.getOwnPropertySymbols !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object.\n*\n* @name Object\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {Object} object\n*\n* @example\n* var o = new Object( null );\n* // returns {}\n*\n* @example\n* var o = new Object( 5.0 );\n* // returns \n*\n* @example\n* var o = new Object( 'beep' );\n* // returns \n*\n* @example\n* var o1 = {};\n*\n* var o2 = new Object( o1 );\n* // returns {}\n*\n* var bool = ( o1 === o2 );\n* // returns true\n*/\nvar Obj = Object; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Object from '@stdlib/object-ctor';\n\n\n// VARIABLES //\n\nvar propertySymbols = Object.getOwnPropertySymbols;\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own symbol properties.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.getOwnPropertySymbols()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own symbol properties\n*\n* @example\n* var symbols = getOwnPropertySymbols( {} );\n*/\nfunction getOwnPropertySymbols( value ) {\n\treturn propertySymbols( Object( value ) );\n}\n\n\n// EXPORTS //\n\nexport default getOwnPropertySymbols;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an array of an object's own symbol properties.\n*\n* @module @stdlib/utils-property-symbols\n*\n* @example\n* import getOwnPropertySymbols from '@stdlib/utils-property-symbols';\n*\n* var symbols = getOwnPropertySymbols( {} );\n*/\n\n// MODULES //\n\nimport HAS_BUILTIN from './has_builtin.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( HAS_BUILTIN ) {\n\tmain = builtin;\n} else {\n\tmain = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Copy enumerable own properties from one or more source objects to a target object.\n*\n* @module @stdlib/object-assign\n*\n* @example\n* import assign from '@stdlib/object-assign';\n*\n* var out = assign( {}, { 'foo': 'bar' }, { 'baz': 'beep' } );\n* // returns { 'foo': 'bar', 'baz': 'beep' }\n*/\n\n// MODULES //\n\nimport hasObjectAssign from './has_object_assign.js';\nimport main from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar assign;\nif ( hasObjectAssign ) {\n\tassign = main;\n} else {\n\tassign = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array of an object's own symbol properties.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.getOwnPropertySymbols()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {EmptyArray} a list of own symbol properties\n*\n* @example\n* var symbols = getOwnPropertySymbols( {} );\n* // returns []\n*/\nfunction getOwnPropertySymbols() {\n\treturn [];\n}\n\n\n// EXPORTS //\n\nexport default getOwnPropertySymbols;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport keys from '@stdlib/utils-keys';\nimport propertySymbols from '@stdlib/utils-property-symbols';\nimport isEnumerable from '@stdlib/assert-is-enumerable-property';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names and symbols.\n*\n* @param {*} value - input object\n* @returns {Array} a list of own property enumerable names and symbols\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var props = enumerableProperties( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction enumerableProperties( value ) {\n\tvar out;\n\tvar tmp;\n\tvar i;\n\n\tout = keys( value );\n\ttmp = propertySymbols( value );\n\tfor ( i = 0; i < tmp.length; i++ ) {\n\t\tif ( isEnumerable( value, tmp[ i ] ) ) {\n\t\t\tout.push( tmp[ i ] );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default enumerableProperties;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport enumerableProperties from '@stdlib/utils-enumerable-properties';\nimport Object from '@stdlib/object-ctor';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Copies own enumerable properties from source objects to a target object.\n*\n* ## Notes\n*\n* - If a property key is present in multiple sources, the property from the last source that defines the key prevails.\n* - The target object is mutated.\n*\n* @param {Object} target - target object\n* @param {...Object} source - source object(s)\n* @throws {TypeError} first argument must not be null or undefined\n* @returns {Object} target object\n*\n* @example\n* var obj1 = {\n* 'a': 'beep'\n* };\n* var obj2 = {\n* 'b': 'boop'\n* };\n*\n* var out = assign( obj1, obj2 );\n* // returns { 'a': 'beep', 'b': 'boop' }\n*/\nfunction assign( target ) {\n\tvar source;\n\tvar keys;\n\tvar key;\n\tvar len;\n\tvar to;\n\tvar i;\n\tvar j;\n\tif ( target === void 0 || target === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a non-null object. Value: `%s`.', target ) );\n\t}\n\tto = Object( target );\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\tsource = arguments[ i ];\n\t\tif ( source === void 0 || source === null ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tkeys = enumerableProperties( Object( source ) );\n\t\tlen = keys.length;\n\t\tfor ( j = 0; j < len; j++ ) {\n\t\t\tkey = keys[ j ];\n\t\t\tto[ key ] = source[ key ];\n\t\t}\n\t}\n\treturn to;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport flags from '@stdlib/ndarray-base-flags';\n\n\n// MAIN //\n\n/**\n* Returns a specified flag for a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {(string|symbol)} name - flag name\n* @returns {*} flag value\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = flag( zeros( [ 3, 3, 3 ] ), 'READONLY' );\n* // returns \n*/\nfunction flag( x, name ) {\n\treturn flags( x, false )[ name ];\n}\n\n\n// EXPORTS //\n\nexport default flag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport assign from '@stdlib/object-assign';\n\n\n// MAIN //\n\n/**\n* Returns the flags of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `flags` property\n* @returns {Object} flags\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = flags( zeros( [ 3, 3, 3 ] ), false );\n* // returns {...}\n*/\nfunction flags( x, copy ) {\n\tvar f = x.flags;\n\tif ( typeof f !== 'object' || f === null ) {\n\t\treturn {};\n\t}\n\tif ( copy ) {\n\t\treturn assign( {}, f );\n\t}\n\treturn f;\n}\n\n\n// EXPORTS //\n\nexport default flags;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128',\n\t'BooleanArray': 'bool'\n};\n\n\n// EXPORTS //\n\nexport default ctor2dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\nimport BooleanArray from '@stdlib/array-bool';\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array,\n\tBooleanArray\n];\n\n\n// EXPORTS //\n\nexport default CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128',\n\t'bool'\n];\n\n\n// EXPORTS //\n\nexport default DTYPES;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './dtypes.js';\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport getter from '@stdlib/array-base-getter';\nimport dtype from '@stdlib/array-dtype';\n\n\n// MAIN //\n\n/**\n* Tests if an array is sorted in ascending order.\n*\n* @param {Collection} x - input array\n* @returns {boolean} boolean indicating if an array is sorted in ascending order\n*\n* @example\n* var out = isSortedAscending( [ 1, 2, 3 ] );\n* // returns true\n*\n* @example\n* var out = isSortedAscending( [ 3, 2, 1 ] );\n* // returns false\n*\n* @example\n* var out = isSortedAscending( [ 3, 3, 3 ] );\n* // returns true\n*\n* @example\n* var out = isSortedAscending( [ 3 ] );\n* // returns true\n*\n* @example\n* var out = isSortedAscending( [] );\n* // returns false\n*\n* @example\n* var out = isSortedAscending( [ 1, 3, 2 ] );\n* // returns false\n*/\nfunction isSortedAscending( x ) {\n\tvar len;\n\tvar get;\n\tvar dt;\n\tvar v1;\n\tvar v2;\n\tvar i;\n\n\t// Resolve the input array data type:\n\tdt = dtype( x );\n\n\t// Resolve an accessor for retrieving input array elements:\n\tif ( isAccessorArray( x ) ) {\n\t\tget = accessorGetter( dt );\n\t} else {\n\t\tget = getter( dt );\n\t}\n\t// Get the number of elements over which to iterate:\n\tlen = x.length;\n\n\t// Check for an empty array:\n\tif ( len === 0 ) {\n\t\treturn false;\n\t}\n\t// Loop over the elements...\n\tv1 = get( x, 0 );\n\tfor ( i = 1; i < len; i++ ) {\n\t\tv2 = get( x, i );\n\t\tif ( v1 > v2 ) {\n\t\t\treturn false;\n\t\t}\n\t\tv1 = v2;\n\t}\n\treturn true;\n}\n\n\n// EXPORTS //\n\nexport default isSortedAscending;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major-string';\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nimport toNormalizedIndices from '@stdlib/ndarray-base-to-unique-normalized-indices';\nimport getDType from '@stdlib/ndarray-base-dtype';\nimport getShape from '@stdlib/ndarray-base-shape';\nimport getStrides from '@stdlib/ndarray-base-strides';\nimport getOffset from '@stdlib/ndarray-base-offset';\nimport getOrder from '@stdlib/ndarray-base-order';\nimport getData from '@stdlib/ndarray-base-data-buffer';\nimport ones from '@stdlib/array-base-ones';\nimport zeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Expands the shape of an array to a specified dimensionality by spreading its dimensions to specified dimension indices and inserting dimensions of size one for the remaining dimensions.\n*\n* ## Notes\n*\n* - Each provided dimension index must reside on the interval `[-ndims, ndims-1]`. If provided a negative dimension index, the position at which to place a respective dimension is computed as `ndims + index`.\n* - Provided dimension indices must resolve to normalized dimension indices arranged in ascending order.\n*\n* @param {NonNegativeInteger} ndims - number of dimensions in the output array\n* @param {ndarray} x - input array\n* @param {IntegerArray} dims - dimension indices at which to spread array dimensions\n* @throws {RangeError} first argument must be greater than or equal to the number of dimensions in the input array\n* @throws {RangeError} must provide the same number of dimension indices as the number of dimensions in the input array\n* @throws {RangeError} must provide valid dimension indices\n* @throws {Error} must provide unique dimension indices\n* @throws {Error} dimension indices must resolve to normalized dimension indices arranged in ascending order\n* @returns {ndarray} output array\n*\n* @example\n* import array from '@stdlib/ndarray-array';\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = spreadDimensions( 5, x, [ 1, 3 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 1, 2, 1, 2, 1 ]\n*\n* var v = y.get( 0, 0, 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 0, 1, 0 );\n* // returns 2\n*\n* v = y.get( 0, 1, 0, 0, 0 );\n* // returns 3\n*\n* v = y.get( 0, 1, 0, 1, 0 );\n* // returns 4\n*/\nfunction spreadDimensions( ndims, x, dims ) {\n\tvar strides;\n\tvar shape;\n\tvar isrm;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar d;\n\tvar S;\n\tvar s;\n\tvar i;\n\tvar j;\n\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tord = getOrder( x );\n\tisrm = isRowMajor( ord );\n\n\tif ( sh.length > ndims ) {\n\t\tthrow new RangeError( format( 'invalid argument. First argument must be greater than or equal to the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `%d`.', sh.length, ndims ) );\n\t}\n\t// Resolve dimension indices...\n\td = toNormalizedIndices( dims, ndims-1 );\n\tif ( d === null ) {\n\t\tthrow new RangeError( format( 'invalid argument. Specified dimension index is out-of-bounds. Must be on the interval: [-%u, %u]. Value: `[%s]`.', ndims, ndims-1, dims.join( ', ' ) ) );\n\t}\n\tif ( d.length !== dims.length ) {\n\t\tthrow new Error( format( 'invalid argument. Must provide unique dimension indices. Value: `[%s]`.', dims.join( ', ' ) ) );\n\t}\n\tif ( d.length !== sh.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Must provide the same number of dimension indices as the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `[%s]`.', sh.length, dims.join( ', ' ) ) );\n\t}\n\tif ( d.length && !isSortedAscending( d ) ) {\n\t\tthrow new Error( format( 'invalid argument. Must provide dimension indices which resolve to nonnegative indices arranged in ascending order. Value: `[%s]`.', dims.join( ', ' ) ) );\n\t}\n\t// When provided a zero-dimensional array, every expanded dimension is a singleton dimension having zero stride...\n\tif ( sh.length === 0 ) {\n\t\tshape = ones( ndims );\n\t\tstrides = zeros( ndims );\n\t} else {\n\t\t// Interweave singleton dimensions...\n\t\tstrides = [];\n\t\tshape = [];\n\t\tj = 0;\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( i === d[ j ] ) {\n\t\t\t\t// If we have a match, we can move on to inserting singleton dimensions before the next dimension index...\n\t\t\t\tS = sh[ j ];\n\t\t\t\ts = st[ j ];\n\t\t\t\tj += 1;\n\t\t\t} else if ( j === sh.length ) { // append\n\t\t\t\t// We should only get here after exhausting all the dimension indices...\n\t\t\t\tS = 1;\n\t\t\t\ts = st[ j-1 ];\n\t\t\t\tif ( !isrm ) {\n\t\t\t\t\ts *= sh[ j-1 ];\n\t\t\t\t}\n\t\t\t} else { // insert before\n\t\t\t\t// We have yet to reach the next specified dimension index so we insert a singleton dimension...\n\t\t\t\tS = 1;\n\t\t\t\ts = st[ j ];\n\t\t\t\tif ( isrm ) {\n\t\t\t\t\ts *= sh[ j ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tshape.push( S );\n\t\t\tstrides.push( s );\n\t\t}\n\t}\n\tif ( isReadOnly( x ) ) {\n\t\t// If provided a read-only view, the returned array should also be read-only...\n\t\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), ord, { // eslint-disable-line max-len\n\t\t\t'readonly': true\n\t\t});\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), ord ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default spreadDimensions;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests whether an input value is the string representing row-major order.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean result\n*\n* @example\n* var bool = isRowMajorString( 'row-major' );\n* // returns true\n*\n* bool = isRowMajorString( 'column-major' );\n* // returns false\n*\n* bool = isRowMajorString( 'foo' );\n* // returns false\n*/\nfunction isRowMajorString( v ) {\n\treturn ( v === 'row-major' );\n}\n\n\n// EXPORTS //\n\nexport default isRowMajorString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a \"generic\" array filled with ones.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = ones( 3 );\n* // returns [ 1.0, 1.0, 1.0 ]\n*/\nfunction ones( len ) {\n\treturn filled( 1.0, len );\n}\n\n\n// EXPORTS //\n\nexport default ones;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport flag from '@stdlib/ndarray-base-flag';\n\n\n// MAIN //\n\n/**\n* Tests whether an ndarray is read-only.\n*\n* @param {ndarray} arr - input ndarray\n* @returns {boolean} boolean indicating whether an ndarray is read-only\n*\n* @example\n* import array from '@stdlib/ndarray-array';\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\nfunction isReadOnly( arr ) {\n\treturn ( flag( arr, 'READONLY' ) === true );\n}\n\n\n// EXPORTS //\n\nexport default isReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar getProto = Object.getPrototypeOf;\n\n\n// EXPORTS //\n\nexport default getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFunction from '@stdlib/assert-is-function';\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar getProto;\nif ( isFunction( Object.getPrototypeOf ) ) {\n\tgetProto = builtin;\n} else {\n\tgetProto = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport getProto from './proto.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {(Object|null)} prototype\n*/\nfunction getPrototypeOf( obj ) {\n\tvar proto = getProto( obj );\n\tif ( proto || proto === null ) {\n\t\treturn proto;\n\t}\n\tif ( nativeClass( obj.constructor ) === '[object Function]' ) {\n\t\t// May break if the constructor has been tampered with...\n\t\treturn obj.constructor.prototype;\n\t}\n\tif ( obj instanceof Object ) {\n\t\treturn Object.prototype;\n\t}\n\t// Return `null` for objects created via `Object.create( null )`. Also return `null` for cross-realm objects on browsers that lack `__proto__` support, such as IE < 11.\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the value of the `__proto__` property.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {*} value of `__proto__` property\n*/\nfunction getProto( obj ) {\n\t// eslint-disable-next-line no-proto\n\treturn obj.__proto__;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObject from '@stdlib/assert-is-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport getPrototypeOf from '@stdlib/utils-get-prototype-of';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar objectPrototype = Object.prototype;\n\n\n// FUNCTIONS //\n\n/**\n* Tests that an object only has own properties.\n*\n* @private\n* @param {Object} obj - value to test\n* @returns {boolean} boolean indicating if an object only has own properties\n*/\nfunction ownProps( obj ) {\n\tvar key;\n\n\t// NOTE: possibility of perf boost if key enumeration order is known (see http://stackoverflow.com/questions/18531624/isplainobject-thing).\n\tfor ( key in obj ) {\n\t\tif ( !hasOwnProp( obj, key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n\n// MAIN //\n\n/**\n* Tests if a value is a plain object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a plain object\n*\n* @example\n* var bool = isPlainObject( {} );\n* // returns true\n*\n* @example\n* var bool = isPlainObject( null );\n* // returns false\n*/\nfunction isPlainObject( value ) {\n\tvar proto;\n\n\t// Screen for obvious non-objects...\n\tif ( !isObject( value ) ) {\n\t\treturn false;\n\t}\n\t// Objects with no prototype (e.g., `Object.create( null )`) are plain...\n\tproto = getPrototypeOf( value );\n\tif ( !proto ) {\n\t\treturn true;\n\t}\n\t// Objects having a prototype are plain if and only if they are constructed with a global `Object` function and the prototype points to the prototype of a plain object...\n\treturn (\n\t\t// Cannot have own `constructor` property:\n\t\t!hasOwnProp( value, 'constructor' ) &&\n\n\t\t// Prototype `constructor` property must be a function (see also https://bugs.jquery.com/ticket/9897 and http://stackoverflow.com/questions/18531624/isplainobject-thing):\n\t\thasOwnProp( proto, 'constructor' ) &&\n\t\tisFunction( proto.constructor ) &&\n\t\tnativeClass( proto.constructor ) === '[object Function]' &&\n\n\t\t// Test for object-specific method:\n\t\thasOwnProp( proto, 'isPrototypeOf' ) &&\n\t\tisFunction( proto.isPrototypeOf ) &&\n\n\t\t(\n\t\t\t// Test if the prototype matches the global `Object` prototype (same realm):\n\t\t\tproto === objectPrototype ||\n\n\t\t\t// Test that all properties are own properties (cross-realm; *most* likely a plain object):\n\t\t\townProps( value )\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPlainObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Object from '@stdlib/object-ctor';\nimport getProto from './detect.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @param {*} value - input value\n* @returns {(Object|null)} prototype\n*\n* @example\n* var proto = getPrototypeOf( {} );\n* // returns {}\n*/\nfunction getPrototypeOf( value ) {\n\tif (\n\t\tvalue === null ||\n\t\tvalue === void 0\n\t) {\n\t\treturn null;\n\t}\n\t// In order to ensure consistent ES5/ES6 behavior, cast input value to an object (strings, numbers, booleans); ES5 `Object.getPrototypeOf` throws when provided primitives and ES6 `Object.getPrototypeOf` casts:\n\tvalue = Object( value );\n\n\treturn getProto( value );\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is array-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is array-like\n*\n* @example\n* var bool = isArrayLike( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLike( {'length':10} );\n* // returns true\n*/\nfunction isArrayLike( value ) {\n\treturn (\n\t\tvalue !== void 0 &&\n\t\tvalue !== null &&\n\t\ttypeof value !== 'function' &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = require( 'buffer' ).Buffer; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Buffer constructor.\n*\n* @module @stdlib/buffer-ctor\n*\n* @example\n* import ctor from '@stdlib/buffer-ctor';\n*\n* var b = new ctor( [ 1, 2, 3, 4 ] );\n* // returns \n*/\n\n// MODULES //\n\nimport hasNodeBufferSupport from '@stdlib/assert-has-node-buffer-support';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasNodeBufferSupport() ) {\n\tctor = main;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write (browser) polyfill\n\n// MAIN //\n\n/**\n* Buffer constructor.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Allocate a buffer having a specified number of bytes.\n*\n* @module @stdlib/buffer-alloc-unsafe\n*\n* @example\n* import allocUnsafe from '@stdlib/buffer-alloc-unsafe';\n*\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasAllocUnsafe from './has_alloc_unsafe.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar allocUnsafe;\nif ( hasAllocUnsafe ) {\n\tallocUnsafe = main;\n} else {\n\tallocUnsafe = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFunction from '@stdlib/assert-is-function';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\nvar bool = isFunction( Buffer.allocUnsafe );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport format from '@stdlib/string-format';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\n/**\n* Allocates a buffer having a specified number of bytes.\n*\n* ## Notes\n*\n* - The underlying memory of returned `Buffer` instances is not initialized. Memory contents are unknown and may contain sensitive data.\n* - When the size is less than half the pool size (specified on the `Buffer` constructor), memory is allocated from the `Buffer` pool for faster allocation of new `Buffer` instances.\n*\n* @param {NonNegativeInteger} size - number of bytes to allocate\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {Buffer} new `Buffer` instance\n*\n* @example\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\nfunction allocUnsafe( size ) {\n\tif ( !isNonNegativeInteger( size ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', size ) );\n\t}\n\treturn Buffer.allocUnsafe( size );\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport format from '@stdlib/string-format';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\n/**\n* Allocates a buffer having a specified number of bytes.\n*\n* ## Notes\n*\n* - The underlying memory of returned `Buffer` instances is not initialized. Memory contents are unknown and may contain sensitive data.\n* - When the size is less than half the pool size (specified on the `Buffer` constructor), memory is allocated from the `Buffer` pool for faster allocation of new `Buffer` instances.\n*\n* @param {NonNegativeInteger} size - number of bytes to allocate\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {Buffer} new `Buffer` instance\n*\n* @example\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\nfunction allocUnsafe( size ) {\n\tif ( !isNonNegativeInteger( size ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', size ) );\n\t}\n\treturn new Buffer( size );\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLike from '@stdlib/assert-is-array-like';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array-like object passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array-like object function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arraylikefcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arraylikefcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array-like object passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array-like object for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArrayLike( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arraylikefcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an array-like object containing only nonnegative integers.\n*\n* @module @stdlib/assert-is-nonnegative-integer-array\n*\n* @example\n* import isNonNegativeIntegerArray from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ 3.0, new Number(3.0) ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 3.0, '3.0' ] );\n* // returns false\n*\n* @example\n* import { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ 1.0, 0.0, 10.0 ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 3.0, new Number(1.0) ] );\n* // returns false\n*\n* @example\n* import { objects as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ new Number(3.0), new Number(1.0) ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 1.0, 0.0, 10.0 ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-like-function';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isNonNegativeInteger.isPrimitive );\nvar isObjectArray = arrayfun( isNonNegativeInteger.isObject );\n\n\n// MAIN //\n\nvar isNonNegativeIntegerArray = arrayfun( isNonNegativeInteger );\nsetReadOnly( isNonNegativeIntegerArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isNonNegativeIntegerArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isNonNegativeIntegerArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an array-like object containing only integers.\n*\n* @module @stdlib/assert-is-integer-array\n*\n* @example\n* import isIntegerArray from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ -3.0, new Number(0.0), 2.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -3.0, '3.0' ] );\n* // returns false\n*\n* @example\n* import { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ -1.0, 10.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -1.0, 0.0, 5.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -3.0, new Number(-1.0) ] );\n* // returns false\n*\n* @example\n* import { objects as isIntegerArray } from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ new Number(1.0), new Number(3.0) ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -1.0, 0.0, 3.0 ] );\n* // returns false\n*\n* bool = isIntegerArray( [ 3.0, new Number(-1.0) ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport isInteger from '@stdlib/assert-is-integer';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-like-function';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isInteger.isPrimitive );\nvar isObjectArray = arrayfun( isInteger.isObject );\n\n\n// MAIN //\n\nvar isIntegerArray = arrayfun( isInteger );\nsetReadOnly( isIntegerArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isIntegerArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isIntegerArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport orders from '@stdlib/ndarray-orders';\n\n\n// VARIABLES //\n\nvar ORDERS = orders();\nvar len = ORDERS.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is an ndarray order.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is an ndarray order\n*\n* @example\n* var bool = isOrder( 'row-major' );\n* // returns true\n*\n* bool = isOrder( 'column-major' );\n* // returns true\n*\n* bool = isOrder( 'foo' );\n* // returns false\n*/\nfunction isOrder( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === ORDERS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isOrder;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport replace from '@stdlib/string-base-replace';\nimport DTYPES from './dtypes.json';\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of ndarray data types\n*\n* @example\n* var list = dtypes();\n* // returns [...]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable stdlib/empty-line-before-comment */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects. While certain dtypes, such as \"generic\" and \"binary\", have special behavior in JavaScript, they do not have a direct complement in C.\n*\n* @private\n* @returns {Object} object mapping supported dtypes to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `dtypes.h` enumeration!!!!\n\treturn {\n\t\t// Boolean data types:\n\t\t'bool': 0,\n\n\t\t// Integer data types:\n\t\t'int8': 1,\n\t\t'uint8': 2,\n\t\t'uint8c': 3,\n\t\t'int16': 4,\n\t\t'uint16': 5,\n\t\t'int32': 6,\n\t\t'uint32': 7,\n\t\t'int64': 8,\n\t\t'uint64': 9,\n\t\t// 'int128': 10, // uncomment once supported\n\t\t// 'uint128': 11,\n\t\t// 'int256': 12,\n\t\t// 'uint256': 13,\n\n\t\t// Floating-point data types:\n\t\t// 'float16': 14,\n\t\t// 'bfloat16': 15,\n\t\t'float32': 10,\n\t\t'float64': 11,\n\t\t// 'float128': 18, // uncomment once supported\n\n\t\t// Complex floating-point number data types:\n\t\t'complex64': 12,\n\t\t'complex128': 13,\n\n\t\t// Data type for \"binary\" data (i.e., data stored in a Node.js `Buffer` object):\n\t\t'binary': 14,\n\n\t\t// Data type for \"generic\" JavaScript values (objects):\n\t\t'generic': 15,\n\n\t\t// Define a signaling value which is guaranteed not to be a valid type enumeration value:\n\t\t'notype': 17,\n\n\t\t// Indicate the start of user defined type numbers (leaving room for type growth above):\n\t\t'userdefined_type': 256\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumeration;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types.\n*\n* @module @stdlib/ndarray-dtypes\n*\n* @example\n* import dtypes from '@stdlib/ndarray-dtypes';\n*\n* var list = dtypes();\n* // returns [...]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\nimport objectKeys from '@stdlib/utils-keys';\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport dtypes from '@stdlib/ndarray-dtypes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray data type.\n*\n* @name isDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray data type\n*\n* @example\n* var bool = isDataType( 'binary' );\n* // returns true\n*\n* bool = isDataType( 'float32' );\n* // returns true\n*\n* bool = isDataType( 'float64' );\n* // returns true\n*\n* bool = isDataType( 'generic' );\n* // returns true\n*\n* bool = isDataType( 'int16' );\n* // returns true\n*\n* bool = isDataType( 'int32' );\n* // returns true\n*\n* bool = isDataType( 'int8' );\n* // returns true\n*\n* bool = isDataType( 'uint16' );\n* // returns true\n*\n* bool = isDataType( 'uint32' );\n* // returns true\n*\n* bool = isDataType( 'uint8' );\n* // returns true\n*\n* bool = isDataType( 'uint8c' );\n* // returns true\n*\n* bool = isDataType( 'foo' );\n* // returns false\n*/\nvar isDataType = contains( dtypes() );\n\n\n// EXPORTS //\n\nexport default isDataType;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default ndarray settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32',\n\t\t\t'boolean': 'bool'\n\t\t},\n\n\t\t// Memory layout:\n\t\t'order': 'row-major',\n\n\t\t// Casting mode:\n\t\t'casting': 'safe',\n\n\t\t// Index mode:\n\t\t'index_mode': 'throw'\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'order': DEFAULTS.order,\n\t'casting': DEFAULTS.casting,\n\t'index_mode': DEFAULTS.index_mode\n};\n\n\n// MAIN //\n\n/**\n* Returns a default ndarray setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Tests that a value is a valid constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {(Error|null)} error object or null\n*\n* @example\n* var ctor = function ctor() {};\n*\n* var err = validate( ctor );\n* // returns null\n*\n* err = validate( null );\n* // returns \n*/\nfunction validate( value ) {\n\tvar type = typeof value;\n\tif (\n\t\tvalue === null ||\n\t\t(type !== 'object' && type !== 'function')\n\t) {\n\t\treturn new TypeError( format( 'invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.', value ) );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return default ndarray settings.\n*\n* @module @stdlib/ndarray-defaults\n*\n* @example\n* import defaults from '@stdlib/ndarray-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Object.create;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Dummy constructor.\n*\n* @private\n*/\nfunction Ctor() {\n\t// Empty...\n}\n\n\n// MAIN //\n\n/**\n* An `Object.create` shim for older JavaScript engines.\n*\n* @private\n* @param {Object} proto - prototype\n* @returns {Object} created object\n*\n* @example\n* var obj = createObject( Object.prototype );\n* // returns {}\n*/\nfunction createObject( proto ) {\n\tCtor.prototype = proto;\n\treturn new Ctor();\n}\n\n\n// EXPORTS //\n\nexport default createObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar createObject;\nif ( typeof builtin === 'function' ) {\n\tcreateObject = builtin;\n} else {\n\tcreateObject = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default createObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Restricts an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = clampIndex( -1, 10 );\n* // returns 0\n*\n* idx = clampIndex( 15, 10 );\n* // returns 10\n*\n* idx = clampIndex( 5, 10 );\n* // returns 5\n*/\nfunction clampIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\treturn 0;\n\t}\n\tif ( idx > max ) {\n\t\treturn max;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default clampIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Wraps an index on the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = wrapIndex( -1, 10 );\n* // returns 10\n*\n* idx = wrapIndex( 13, 10 );\n* // returns 2\n*\n* idx = wrapIndex( 6, 10 );\n* // returns 6\n*/\nfunction wrapIndex( idx, max ) {\n\tvar mp1 = max + 1;\n\tif ( idx < 0 ) {\n\t\tidx += mp1; // slight optimization to avoid modulo arithmetic when |idx| <= max+1\n\t\tif ( idx < 0 ) {\n\t\t\tidx %= mp1;\n\t\t\tif ( idx !== 0 ) {\n\t\t\t\tidx += mp1;\n\t\t\t}\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\tidx -= mp1; // slight optimization to avoid modulo arithmetic when max+1 < idx <= 2*(max+1)\n\t\tif ( idx > max ) {\n\t\t\tidx %= mp1;\n\t\t}\n\t\treturn idx;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default wrapIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport modes from '@stdlib/ndarray-index-modes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray index mode.\n*\n* @name isIndexMode\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray index mode\n*\n* @example\n* var bool = isIndexMode( 'wrap' );\n* // returns true\n*\n* bool = isIndexMode( 'clamp' );\n* // returns true\n*\n* bool = isIndexMode( 'throw' );\n* // returns true\n*\n* bool = isIndexMode( 'foo' );\n* // returns false\n*/\nvar isIndexMode = contains( modes() );\n\n\n// EXPORTS //\n\nexport default isIndexMode;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport clampIndex from '@stdlib/ndarray-base-clamp-index';\nimport wrapIndex from '@stdlib/ndarray-base-wrap-index';\nimport normalize from '@stdlib/ndarray-base-normalize-index';\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar TABLE = {\n\t'wrap': wrapIndex,\n\t'clamp': clampIndex,\n\t'normalize': normalizeIndex,\n\t'throw': throwIfOutOfBounds\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an index if within bounds and throw an error otherwise.\n*\n* @private\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = throwIfOutOfBounds( 2, 9 );\n* // returns 2\n*\n* idx = throwIfOutOfBounds( 10, 9 );\n* // throws \n*\n* idx = throwIfOutOfBounds( -1, 9 );\n* // throws \n*/\nfunction throwIfOutOfBounds( idx, max ) {\n\tif ( idx < 0 || idx > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn idx;\n}\n\n/**\n* Normalizes an index before performing a strict bounds check.\n*\n* @private\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = normalizeIndex( 1, 10 );\n* // returns 1\n*\n* idx = normalizeIndex( -4, 10 );\n* // returns 7\n*\n* idx = normalizeIndex( -100, 10 );\n* // throws \n*/\nfunction normalizeIndex( idx, max ) {\n\tvar index = normalize( idx, max );\n\tif ( index < 0 || index > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn index;\n}\n\n\n// MAIN //\n\n/**\n* Returns a function for returning an index according to a provided index mode.\n*\n* @param {string} mode - specifies how to handle an out-of-bounds index\n* @throws {TypeError} first argument must be a recognized index mode\n* @returns {Function} function for returning an index\n*\n* @example\n* var ind = factory( 'clamp' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // returns 9\n*\n* idx = ind( -1, 9 );\n* // returns 0\n*\n* @example\n* var ind = factory( 'wrap' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // returns 0\n*\n* idx = ind( -1, 9 );\n* // returns 9\n*\n* @example\n* var ind = factory( 'throw' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // throws \n*\n* idx = ind( -1, 9 );\n* // throws \n*\n* @example\n* var ind = factory( 'normalize' );\n*\n* var idx = ind( 1, 10 );\n* // returns 1\n*\n* idx = ind( -4, 10 );\n* // returns 7\n*\n* idx = ind( -100, 10 );\n* // throws \n*/\nfunction factory( mode ) {\n\tif ( !isIndexMode( mode ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a recognized index mode. Value: `%s`.', mode ) );\n\t}\n\treturn TABLE[ mode ];\n}\n\n\n// EXPORTS //\n\nexport default factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport clampIndex from '@stdlib/ndarray-base-clamp-index';\nimport wrapIndex from '@stdlib/ndarray-base-wrap-index';\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an index given an index mode.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @param {string} mode - specifies how to handle an index outside the interval `[0,max]`\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = ind( 2, 9, 'clamp' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'clamp' );\n* // returns 9\n*\n* idx = ind( -1, 9, 'clamp' );\n* // returns 0\n*\n* @example\n* var idx = ind( 2, 9, 'wrap' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'wrap' );\n* // returns 0\n*\n* idx = ind( -1, 9, 'wrap' );\n* // returns 9\n*\n* @example\n* var idx = ind( 2, 9, 'throw' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'throw' );\n* // throws \n*\n* idx = ind( -1, 9, 'throw' );\n* // throws \n*\n* @example\n* var idx = ind( 1, 10, 'normalize' );\n* // returns 1\n*\n* idx = ind( -4, 10, 'normalize' );\n* // returns 7\n*\n* idx = ind( -100, 10, 'normalize' );\n* // throws \n*/\nfunction ind( idx, max, mode ) {\n\tvar index;\n\tif ( mode === 'clamp' ) {\n\t\treturn clampIndex( idx, max );\n\t}\n\tif ( mode === 'wrap' ) {\n\t\treturn wrapIndex( idx, max );\n\t}\n\tindex = idx;\n\tif ( mode === 'normalize' ) {\n\t\tindex = normalizeIndex( index, max );\n\t}\n\tif ( index < 0 || index > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn index;\n}\n\n\n// EXPORTS //\n\nexport default ind;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an index given an index mode.\n*\n* @module @stdlib/ndarray-base-ind\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( -1, 10, 'wrap' );\n* // returns 10\n*\n* idx = ind( 14, 10, 'wrap' );\n* // returns 3\n*\n* idx = ind( 6, 10, 'wrap' );\n* // returns 6\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( -1, 10, 'clamp' );\n* // returns 0\n*\n* idx = ind( 14, 10, 'clamp' );\n* // returns 10\n*\n* idx = ind( 6, 10, 'clamp' );\n* // returns 6\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( 1, 10, 'throw' );\n* // returns 1\n*\n* idx = ind( 14, 10, 'throw' );\n* // throws \n*\n* idx = ind( -1, 10, 'throw' );\n* // throws \n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( 1, 10, 'normalize' );\n* // returns 1\n*\n* idx = ind( -4, 10, 'normalize' );\n* // returns 7\n*\n* idx = ind( -100, 10, 'normalize' );\n* // throws \n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var fcn = ind.factory( 'clamp' );\n*\n* var idx = fcn( -1, 10 );\n* // returns 0\n*\n* idx = fcn( 14, 10 );\n* // returns 10\n*\n* idx = fcn( 6, 10 );\n* // returns 6\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport factory from './factory.js';\nimport main from './main.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iget;\n\n\n// MAIN //\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\treturn base.call( this, idx );\n\t}\n\treturn base.call( this );\n}\n\n\n// EXPORTS //\n\nexport default iget;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// METHODS //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iset;\n\n\n// MAIN //\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\tbase.call( this, idx, v );\n\t} else {\n\t\tbase.call( this, idx );\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default iset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies the contents of array-like value to a new array.\n*\n* @private\n* @param {ArrayLike} arr - input array\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var arr = [ 1.0, 2.0, 3.0 ];\n*\n* var out = copy( arr, arr.length );\n* // returns [ 1.0, 2.0, 3.0 ]\n*\n* var bool = ( arr === out );\n* // returns false\n*/\nfunction copy( arr, len ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( arr[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default copy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isCollection from '@stdlib/assert-is-collection';\nimport { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nimport numel from '@stdlib/ndarray-base-numel';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport defaults from '@stdlib/ndarray-defaults';\nimport inherit from '@stdlib/utils-inherit';\nimport format from '@stdlib/string-format';\nimport iget from './iget.js';\nimport iset from './iset.js';\nimport get from './get.js';\nimport set from './set.js';\nimport copy from './copy_array.js';\nimport validate from './validate.js';\n\n\n// VARIABLES //\n\n/*\n* See the following references:\n*\n* - https://stackoverflow.com/questions/22747068/is-there-a-max-number-of-arguments-javascript-functions-can-accept\n* - https://bugs.webkit.org/show_bug.cgi?id=80797\n* - https://github.com/numpy/numpy/issues/5744\n*\n* Note that the maximum number of function arguments can vary from engine to engine. Here, we choose something of a lowest common denominator which may **not** be valid everywhere.\n*/\nvar MAX_DIMS = 32767|0;\n\nvar INDEX_MODE = defaults.get( 'index_mode' );\nvar READONLY = false;\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {Collection} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} `dtype` argument must be a supported ndarray data type\n* @throws {TypeError} `buffer` argument must be an array-like object, typed-array-like, or a Buffer\n* @throws {TypeError} `buffer` argument `get` and `set` properties must be functions\n* @throws {TypeError} `shape` argument must be an array-like object containing nonnegative integers\n* @throws {Error} `shape` argument length must equal the number of dimensions\n* @throws {TypeError} `strides` argument must be an array-like object containing integers\n* @throws {Error} `strides` argument length must equal the number of dimensions (except for zero-dimensional arrays; in which case, the `strides` argument length must be equal to `1`)\n* @throws {Error} for zero-dimensional ndarrays, the `strides` argument must contain a single element equal to `0`\n* @throws {TypeError} `offset` argument must be a nonnegative integer\n* @throws {TypeError} `order` argument must be a supported ndarray order\n* @throws {Error} `buffer` argument must be compatible with specified meta data\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} too many dimensions\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order, options ) {\n\tvar ndims;\n\tvar opts;\n\tvar err;\n\tvar sh;\n\tvar st;\n\n\tif ( !(this instanceof ndarray) ) {\n\t\tif ( arguments.length < 7 ) {\n\t\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t\t}\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order, options ); // eslint-disable-line max-len\n\t}\n\tif ( !isDataType( dtype ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a supported ndarray data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( !isCollection( buffer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.', buffer ) );\n\t} else if ( buffer.get && buffer.set && ( !isFunction( buffer.get ) || !isFunction( buffer.set ) ) ) { // eslint-disable-line max-len\n\t\tthrow new TypeError( format( 'invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.', buffer ) );\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tif ( !isCollection( shape) || shape.length > 0 ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t}\n\tndims = shape.length;\n\tif ( ndims > MAX_DIMS ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.', MAX_DIMS, ndims ) );\n\t}\n\tif ( !isIntegerArray( strides ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.', strides ) );\n\t}\n\tif ( ndims > 0 ) {\n\t\tif ( strides.length !== ndims ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.', ndims, strides.length ) );\n\t\t}\n\t} else if ( strides.length !== 1 ) {\n\t\tthrow new RangeError( 'invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.' );\n\t} else if ( strides[ 0 ] !== 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.', strides[ 0 ] ) );\n\t}\n\tif ( !isNonNegativeInteger( offset ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.', offset ) );\n\t}\n\tif ( !isOrder( order ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Sixth argument must be a supported order. Value: `%s`.', order ) );\n\t}\n\tif ( ndims > 0 && !isBufferLengthCompatible( buffer.length, shape, strides, offset ) && numel( shape ) > 0 ) { // eslint-disable-line max-len\n\t\tthrow new Error( 'invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.' );\n\t}\n\topts = {};\n\topts.mode = INDEX_MODE;\n\topts.readonly = READONLY;\n\tif ( arguments.length > 6 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tthis._mode = opts.mode;\n\tif ( opts.submode === void 0 ) {\n\t\topts.submode = [ this._mode ];\n\t}\n\tthis._submode = opts.submode;\n\n\t// Copy `shape` and `strides` to prevent external mutation:\n\tsh = copy( shape, ndims );\n\tst = copy( strides, ndims || 1 );\n\n\t// Call the parent constructor:\n\tparent.call( this, dtype, buffer, sh, st, offset, order );\n\tthis._flags.READONLY = opts.readonly;\n\n\treturn this;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n// Inherit from the parent constructor:\ninherit( ndarray, parent );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', get );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', iget );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', set );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', iset );\n\n\n// EXPORTS //\n\nexport default ndarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport minmax from '@stdlib/ndarray-base-minmax-view-buffer-index';\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data.\n*\n* @param {NonNegativeInteger} len - buffer length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if a buffer length is compatible\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns false\n*/\nfunction isBufferLengthCompatible( len, shape, strides, offset ) {\n\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\tvar buf = minmax( shape, strides, offset );\n\n\t// If the indices are \"inbounds\", then the buffer length is compatible:\n\treturn ( buf[ 0 ] >= 0 && buf[ 1 ] < len );\n}\n\n\n// EXPORTS //\n\nexport default isBufferLengthCompatible;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObject from '@stdlib/assert-is-plain-object';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArray from '@stdlib/assert-is-array';\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.mode] - specifies how to handle indices which exceed array dimensions\n* @param {string} [options.submode] - specifies how to handle subscripts which exceed array dimensions\n* @param {boolean} [options.readonly] - boolean indicating whether an array should be read-only\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'clamp',\n* 'submode': [ 'throw', 'wrap', 'clamp' ]\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tvar i;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isIndexMode( opts.mode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a recognized mode. Option: `%s`.', 'mode', opts.mode ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\topts.submode = options.submode;\n\t\tif ( !isArray( opts.submode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode ) );\n\t\t}\n\t\tif ( opts.submode.length === 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode.join( ',' ) ) );\n\t\t}\n\t\tfor ( i = 0; i < opts.submode.length; i++ ) {\n\t\t\tif ( !isIndexMode( opts.submode[ i ] ) ) {\n\t\t\t\treturn new TypeError( format( 'invalid option. Each submode must be a recognized mode. Option: `%s`.', opts.submode[ i ] ) );\n\t\t\t}\n\t\t}\n\t\topts.submode = opts.submode.slice();\n\t}\n\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\topts.readonly = options.readonly;\n\t\tif ( !isBoolean( opts.readonly ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', opts.readonly ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\nimport format from '@stdlib/string-format';\nimport validate from './validate.js';\nimport createObject from './detect.js';\n\n\n// MAIN //\n\n/**\n* Implements prototypical inheritance by replacing the prototype of one constructor with the prototype of another constructor.\n*\n* ## Notes\n*\n* - This implementation is not designed to work with ES2015/ES6 classes. For ES2015/ES6 classes, use `class` with `extends`.\n* - For reference, see [node#3455](https://github.com/nodejs/node/pull/3455), [node#4179](https://github.com/nodejs/node/issues/4179), [node#3452](https://github.com/nodejs/node/issues/3452), and [node commit](https://github.com/nodejs/node/commit/29da8cf8d7ab8f66b9091ab22664067d4468461e#diff-3deb3f32958bb937ae05c6f3e4abbdf5).\n*\n* @param {(Object|Function)} ctor - constructor which will inherit\n* @param {(Object|Function)} superCtor - super (parent) constructor\n* @throws {TypeError} first argument must be either an object or a function which can inherit\n* @throws {TypeError} second argument must be either an object or a function from which a constructor can inherit\n* @throws {TypeError} second argument must have an inheritable prototype\n* @returns {(Object|Function)} child constructor\n*\n* @example\n* function Foo() {\n* return this;\n* }\n* Foo.prototype.beep = function beep() {\n* return 'boop';\n* };\n*\n* function Bar() {\n* Foo.call( this );\n* return this;\n* }\n* inherit( Bar, Foo );\n*\n* var bar = new Bar();\n* var v = bar.beep();\n* // returns 'boop'\n*/\nfunction inherit( ctor, superCtor ) {\n\tvar err = validate( ctor );\n\tif ( err ) {\n\t\tthrow err;\n\t}\n\terr = validate( superCtor );\n\tif ( err ) {\n\t\tthrow err;\n\t}\n\tif ( typeof superCtor.prototype === 'undefined' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.', superCtor.prototype ) );\n\t}\n\t// Create a prototype which inherits from the parent prototype:\n\tctor.prototype = createObject( superCtor.prototype );\n\n\t// Set the constructor to refer to the child constructor:\n\tdefineProperty( ctor.prototype, 'constructor', {\n\t\t'configurable': true,\n\t\t'enumerable': false,\n\t\t'writable': true,\n\t\t'value': ctor\n\t});\n\n\treturn ctor;\n}\n\n\n// EXPORTS //\n\nexport default inherit;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {*} array element\n*/\nfunction get() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( arguments.length !== this._ndims ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( arguments.length !== this._ndims+1 ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default set;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPlainObject from '@stdlib/assert-is-plain-object';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArrayLike from '@stdlib/assert-is-array-like';\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport strides2offset from '@stdlib/ndarray-base-strides2offset';\nimport emptyArray from '@stdlib/array-empty';\nimport allocUnsafe from '@stdlib/buffer-alloc-unsafe';\nimport numel from '@stdlib/ndarray-base-numel';\nimport ndarray from '@stdlib/ndarray-ctor';\nimport defaults from '@stdlib/ndarray-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DTYPE = defaults.get( 'dtypes.default' );\nvar ORDER = defaults.get( 'order' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having a specified shape and data type.\n*\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} shape - array shape\n* @param {Options} [options] - options\n* @param {string} [options.dtype='float64'] - data type\n* @param {string} [options.order='row-major'] - array order\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @throws {TypeError} first argument must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a recognized data type\n* @throws {TypeError} `order` option must be a recognized array order\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = empty( [ 2, 2 ] );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float64'\n*/\nfunction empty( shape ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = DTYPE;\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = ORDER;\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t} else {\n\t\tdtype = DTYPE;\n\t\torder = ORDER;\n\t}\n\tif ( typeof shape === 'number' ) {\n\t\tsh = [ shape ];\n\t} else if ( isArrayLike( shape ) ) {\n\t\tsh = shape;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tif ( len !== len || len < 0 ) {\n\t\t\t// We should only get here if we've been provided an invalid shape (e.g., an array containing negative integers, etc)...\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default empty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Formats an error message for production.\n*\n* @param {string} code - error code\n* @param {*} ...args - error message arguments\n* @returns {string} formatted error message\n*\n* @example\n* var msg = fmtprodmsg( '3', 'wrong_type' );\n* // returns 'https://stdlib.io/e/3?&arg[]=wrong_type'\n*/\nfunction fmtprodmsg() {\n\tvar a = arguments;\n\tvar c = a[ 0 ];\n\tvar u = 'https://stdlib.io/e/'+c+'?';\n\tvar i;\n\tfor ( i = 1; i < a.length; i++ ) {\n\t\tu += '&arg[]=' + encodeURIComponent( a[ i ] );\n\t}\n\treturn u;\n}\n\n\n// EXPORTS //\n\nexport default fmtprodmsg;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObject from '@stdlib/assert-is-plain-object';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\nimport isEmptyCollection from '@stdlib/assert-is-empty-collection';\nimport normalizeIndices from '@stdlib/ndarray-base-to-unique-normalized-indices';\nimport join from '@stdlib/array-base-join';\nimport format from '@stdlib/error-tools-fmtprodmsg';\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {NonNegativeInteger} ndims - number of input ndarray dimensions\n* @param {Options} options - function options\n* @param {boolean} [options.keepdims] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'keepdims': true\n* };\n* var err = validate( opts, 3, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, ndims, options ) {\n\tvar tmp;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'null2V', options ) );\n\t}\n\tif ( hasOwnProp( options, 'keepdims' ) ) {\n\t\topts.keepdims = options.keepdims;\n\t\tif ( !isBoolean( opts.keepdims ) ) {\n\t\t\treturn new TypeError( format( 'null2o', 'keepdims', opts.keepdims ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'dims' ) ) {\n\t\topts.dims = options.dims;\n\t\tif ( !isIntegerArray( opts.dims ) && !isEmptyCollection( opts.dims ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array of integers. Option: `%s`.', 'dims', opts.dims ) );\n\t\t}\n\t\ttmp = normalizeIndices( opts.dims, ndims-1 );\n\t\tif ( tmp === null ) {\n\t\t\treturn new RangeError( format( 'invalid option. `%s` option contains an out-of-bounds dimension index. Option: [%s].', 'dims', join( opts.dims, ',' ) ) );\n\t\t}\n\t\tif ( tmp.length !== opts.dims.length ) {\n\t\t\treturn new Error( format( 'invalid option. `%s` option contains duplicate indices. Option: [%s].', 'dims', join( opts.dims, ',' ) ) );\n\t\t}\n\t\tif ( tmp.length > ndims ) {\n\t\t\treturn new RangeError( format( 'invalid option. `%s` option specifies more dimensions than exists in the input array. Number of dimensions: %d. Option: [%s].', ndims, join( opts.dims, ',' ) ) );\n\t\t}\n\t\topts.dims = tmp;\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if a value is an empty collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an empty collection\n*\n* @example\n* var bool = isEmptyCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isEmptyCollection( { 'length': 0 } );\n* // returns true\n*\n* @example\n* var bool = isEmptyCollection( [ 1, 2, 3 ] );\n* // returns false\n*\n* @example\n* var bool = isEmptyCollection( {} );\n* // returns false\n*/\nfunction isEmptyCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.length === 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isEmptyCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isndarrayLike from '@stdlib/assert-is-ndarray-like';\nimport unaryReduceSubarray from '@stdlib/ndarray-base-unary-reduce-subarray';\nimport base from '@stdlib/ndarray-base-count-truthy';\nimport spreadDimensions from '@stdlib/ndarray-base-spread-dimensions';\nimport indicesComplement from '@stdlib/array-base-indices-complement';\nimport getShape from '@stdlib/ndarray-shape'; // note: non-base accessor is intentional due to the input array originating in userland\nimport getOrder from '@stdlib/ndarray-base-order';\nimport empty from '@stdlib/ndarray-empty';\nimport defaults from '@stdlib/ndarray-defaults';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport objectAssign from '@stdlib/object-assign';\nimport format from '@stdlib/error-tools-fmtprodmsg';\nimport DEFAULTS from './defaults.json';\nimport validate from './validate.js';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' );\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements along one or more ndarray dimensions.\n*\n* @param {ndarray} x - input ndarray\n* @param {Options} [options] - function options\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} options argument must be an object\n* @throws {RangeError} dimension indices must not exceed input ndarray bounds\n* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions\n* @throws {Error} must provide valid options\n* @returns {ndarray} output ndarray\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var sh = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );\n*\n* // Perform reduction:\n* var out = countTruthy( x );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\nfunction countTruthy( x, options ) {\n\tvar opts;\n\tvar err;\n\tvar idx;\n\tvar shx;\n\tvar shy;\n\tvar N;\n\tvar y;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'null5t', x ) );\n\t}\n\tshx = getShape( x );\n\tN = shx.length;\n\n\topts = objectAssign( {}, DEFAULTS );\n\tif ( arguments.length > 1 ) {\n\t\terr = validate( opts, N, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\t// When a list of dimensions is not provided, reduce the entire input array across all dimensions...\n\tif ( opts.dims === null ) {\n\t\topts.dims = zeroTo( N );\n\t}\n\t// Resolve the list of non-reduced dimensions:\n\tidx = indicesComplement( N, opts.dims );\n\n\t// Resolve the output array shape:\n\tshy = takeIndexed( shx, idx );\n\n\t// Initialize an output array whose shape matches that of the non-reduced dimensions and which has the same memory layout as the input array:\n\ty = empty( shy, {\n\t\t'dtype': DEFAULT_DTYPE,\n\t\t'order': getOrder( x )\n\t});\n\n\t// Perform the reduction:\n\tunaryReduceSubarray( base, [ x, y ], opts.dims );\n\n\t// Check whether we need to reinsert singleton dimensions which can be useful for broadcasting the returned output array to the shape of the original input array...\n\tif ( opts.keepdims ) {\n\t\ty = spreadDimensions( N, y, idx );\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x ) {\n\tvar out;\n\tvar sh;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\t// Copy the shape in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < sh.length; i++ ) {\n\t\td = sh[ i ];\n\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default shape;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Count the number of truthy elements along one or more ndarray dimensions.\n*\n* @module @stdlib/ndarray-count-truthy\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n* import countTruthy from '@stdlib/ndarray-count-truthy';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var sh = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );\n*\n* // Perform reduction:\n* var out = countTruthy( x );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n* import empty from '@stdlib/ndarray-empty';\n* import countTruthy from '@stdlib/ndarray-count-truthy';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );\n*\n* // Create an output ndarray:\n* var y = empty( [], {\n* 'dtype': 'int32'\n* });\n*\n* // Perform reduction:\n* var out = countTruthy.assign( x, y );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n\n// exports: { \"assign\": \"main.assign\" }\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isndarrayLike from '@stdlib/assert-is-ndarray-like';\nimport unaryReduceSubarray from '@stdlib/ndarray-base-unary-reduce-subarray';\nimport ndims from '@stdlib/ndarray-ndims';\nimport base from '@stdlib/ndarray-base-count-truthy';\nimport objectAssign from '@stdlib/object-assign';\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport format from '@stdlib/error-tools-fmtprodmsg';\nimport defaults from './defaults.json';\nimport validate from './validate.js';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements along one or more ndarray dimensions and assigns the results to a provided output ndarray.\n*\n* @param {ndarray} x - input ndarray\n* @param {ndarray} y - output ndarray\n* @param {Options} [options] - function options\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} second argument must be an ndarray-like object\n* @throws {TypeError} options argument must be an object\n* @throws {Error} must provide valid options\n* @returns {ndarray} output ndarray\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n* import empty from '@stdlib/ndarray-empty';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );\n*\n* // Create an output ndarray:\n* var y = empty( [], {\n* 'dtype': 'int32'\n* });\n*\n* // Perform reduction:\n* var out = assign( x, y );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\nfunction assign( x, y, options ) {\n\tvar opts;\n\tvar err;\n\tvar N;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'null5t', x ) );\n\t}\n\tif ( !isndarrayLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an ndarray-like object. Value: `%s`.', y ) );\n\t}\n\tN = ndims( x );\n\n\topts = objectAssign( {}, defaults );\n\tif ( arguments.length > 2 ) {\n\t\terr = validate( opts, N, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tif ( opts.dims === null ) {\n\t\topts.dims = zeroTo( N );\n\t}\n\tunaryReduceSubarray( base, [ x, y ], opts.dims ); // note: we assume that this lower-level function handles further validation of the output ndarray (e.g., expected shape, etc)\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the number of ndarray dimensions.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} number of dimensions\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\nfunction ndims( x ) {\n\tvar sh;\n\tvar n;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.ndims;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\treturn sh.length;\n}\n\n\n// EXPORTS //\n\nexport default ndims;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isArray","Array","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","isBoolean","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","Bool","Boolean","test","isPrimitive","isObject","setReadOnly","self","window","globalThis","getGlobal","codegen","Function","GlobalThis","Self","Win","Global","setNonEnumerableReadOnlyAccessor","getter","bytesPerElement","dtype","BYTES_PER_ELEMENT","iterationOrder","strides","cnt","x","strides2order","column","ndims","row","s1","s2","isColumnMajorContiguous","order","contiguous","isRowMajorContiguous","minmaxViewBufferIndex","shape","offset","min","max","s","real","z","re","imag","im","isString","valueOf","RE_CHARS","root","nodeList","document","childNodes","typedarray","Int8Array","reFunctionName","RE_FUNCTION_NAME","REGEXP","main$f","isObjectLike","isObjectLikeArray","predicate","len","arrayfun","isBuffer","_isBuffer","constructor","constructorName","name","ctor","ctorName","type","isFunction","typeOf","RegExp","isRegExp","search","newval","rescape","CTORS","int8","uint8","uint8c","int16","uint16","int32","uint32","float32","float64","generic","binary","complex64","complex128","hasUint8Array","Uint8Array","bool","arr","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","Uint8Array$1","hasUint16Array","Uint16Array","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","uint16view","Uint16Array$1","ctors","IS_LITTLE_ENDIAN","buffer","hasArrayBuffer","ArrayBuffer","isArrayBuffer","hasFloat64Array","Float64Array","GlobalFloat64Array","NaN","hasFloat64ArraySupport","Float64Array$1","view","buf","GlobalArrayBuffer","isView","byteLength","hasArrayBufferSupport","ArrayBuffer$1","hasDataView","DataView","GlobalDataView","getFloat64","setFloat64","byteOffset","hasDataViewSupport","DataView$1","BigInteger","BigInt","RE_SUFFIX","dtypes","kind","DTYPES","all","enumeration","int64","uint64","notype","userdefined_type","keys","isArguments","bool$8","detect","hasArgumentsClass","main$8","Number","isNan","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","PINF","NINF","isInt","isEnumerableProperty","propertyIsEnumerable","hasStringEnumBug","isEnum","UINT32_MAX","isArguments$1","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","searchElement","fromIndex","isConstructorPrototype","w","hasAutomationEqualityBug","k","win","EXCLUDED_KEYS","check","HAS_BUILTIN","skipConstructor","skipPrototype","isFcn","p","HAS_ENUM_PROTO_BUG","HAS_NON_ENUM_PROPS_BUG","HAS_WINDOW","error","NON_ENUMERABLE","main$7","target","source","objectKeys","assign","orders","ORDERS","enumerated","DATA","LAYOUTS","modes","MODES","throw","clamp","wrap","normalize","LOW_MASK","TWO_32","BYTES","VIEW","float64ToInt64Bytes","stride","hi","lo","setUint32","bytes","ndarray","nbytes","ord","this","_byteLength","_bytesPerElement","_buffer","_dtype","_length","_ndims","_offset","_order","_shape","_strides","_accessors","_iterationOrder","isContiguous","_flags","ROW_MAJOR_CONTIGUOUS","COLUMN_MAJOR_CONTIGUOUS","READONLY","__meta_dataview__","isndarrayLike","data","copyFlags","idx","ind","dt","iget","join","flgs","sh","st","sm","m","o","N","M","_mode","_submode","setInt8","setInt16","setBigInt64","setInt32","TYPE","isAccessorArray","GETTERS","default","SETTERS","setter","numel","copy","copyIndexed","shape2strides","columnmajor","rowmajor","ROW_MAJOR","strides2offset","COLUMN_MAJOR","ndarraylike2object","xbuf","getData","getShape","getDType","ref","getStrides","getOffset","getOrder","accessorProtocol","accessors","accessorGetter","accessorSetter","normalizeIndex","toUniqueNormalizedIndices","indices","hash","indicesComplement","take2","y","o1","o2","ctor2dtypes","Float32Array","Int16Array","Int32Array","Uint32Array","Uint8ClampedArray","Complex64Array","Complex128Array","hasFloat32Array","GlobalFloat32Array","hasFloat32ArraySupport","Float32Array$1","hasUint32Array","GlobalUint32Array","hasUint32ArraySupport","Uint32Array$1","hasInt32Array","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","Int32Array$1","hasInt16Array","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","Int16Array$1","hasUint8ClampedArray","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","Uint8ClampedArray$1","hasInt8Array","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","Int8Array$1","isNonNegativeInteger","MAX_ARRAY_LENGTH","isArrayLikeObject","Complex128","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","realf","imagf","reinterpret","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","isComplexArrayConstructor","getComplex64","nargs","fromArray","RangeError","reinterpret64","reinterpret128","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","fromIteratorMap","start","copyWithin","iter","entries","end","fcn","separator","sep","outbuf","reducer","initialValue","acc","sbuf","outlen","begin","index","getComplex128","NTYPES","ctor2dtype","arraylike2object","isUndefinedOrNull","method","hasMethod","indexed","zeroTo","complex","take","loopOrder","sx","sy","avx","ix","iy","jx","jy","vx","vy","ux","sort2ins","defaults","BLOCK_SIZE_IN_BYTES","BLOCK_SIZE_IN_ELEMENTS","unaryBlockSize","dtypeX","dtypeY","nbx","nby","filled","incrementOffsets","offsets","inc","setViewOffsets","views","arrays","numeric","floating_point","real_floating_point","complex_floating_point","boolean","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","gzeros","table","BooleanArray","isBooleanArray","isBooleanArrayConstructor","compareFcn","sort","a","b","factory","isComplexFloatingPointDataType","contains","isBooleanDataType","io","xo","oo","isComplexDataType","so","reinterpretBoolean","xdata","odata","xget","oset","without","vind2bind","mode","MODE","UNARY","opts","ybuf","dv0","S0","iv","i0","isRowMajor","dv1","S1","sv","i1","dv2","S2","i2","dv3","S3","i3","dv4","S4","i4","dv5","S5","i5","dv6","S6","i6","dv7","S7","i7","dv8","S8","i8","dv9","S9","i9","ACCESSOR_UNARY","BLOCKED_UNARY","bsize","ov1","s0","ov","j0","j1","takeIndexed","blockSize","ov2","j2","ov3","s3","j3","ov4","s4","j4","ov5","s5","j5","ov6","s6","j6","ov7","s7","j7","ov8","s8","j8","ov9","s9","j9","BLOCKED_ACCESSOR_UNARY","MAX_DIMS","unaryReduceSubarray","dims","options","ldims","shx","shc","shl","iox","ioy","sc","sl","ns","d","K","ndarray2object","normalizeIndices","takeIndexed2","initializeViews","accessorunarynd","unarynd","reduce","C64_BYTES_PER_ELEMENT","C128_BYTES_PER_ELEMENT","gscal","alpha","nullaryBlockSize","COUNT","count","dx0","dx1","dx2","dx3","dx4","dx5","dx6","dx7","dx8","dx9","ACCESSOR_COUNT","COMPLEX_COUNT","BLOCKED_COUNT","ox1","ox","ox2","ox3","ox4","ox5","ox6","ox7","ox8","ox9","BLOCKED_ACCESSOR_COUNT","BLOCKED_COMPLEX_COUNT","countTruthy","isCmplx","xmmv","reinterpretComplex","ordx","accessorcountnd","complexcountnd","countnd","getOwnPropertySymbols","Obj","propertySymbols","enumerableProperties","isEnumerable","hasObjectAssign","key","to","objectAssign","isSortedAscending","v1","v2","spreadDimensions","isrm","S","toNormalizedIndices","ones","readonly","getProto","getPrototypeOf","proto","getProto$1","objectPrototype","isPlainObject","isPrototypeOf","ownProps","isArrayLike","Buffer","allocUnsafe$1","allocUnsafe","size","arraylikefcn","isPrimitiveArray","isObjectArray","isNonNegativeIntegerArray","isIntegerArray","isDataType","casting","index_mode","validate","create","Ctor","createObject$1","clampIndex","wrapIndex","mp1","isIndexMode","TABLE","parent","iset","INDEX_MODE","isOrder","minmax","isBufferLengthCompatible","submode","superCtor","createObject","inherit","getIndex","DTYPE","ORDER","empty","emptyArray","fmtprodmsg","u","encodeURIComponent","keepdims"],"mappings":";4OAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OA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29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,530,532,535]} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 6390b75..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import countTruthy from '../docs/types/index'; -export = countTruthy; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 381f69b..0000000 --- a/dist/index.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict";var o=function(r,i){return function(){return i||r((i={exports:{}}).exports,i),i.exports}};var m=o(function(nr,E){E.exports={dims:null,keepdims:!1}});var l=o(function(sr,f){ -var T=require('@stdlib/assert-is-plain-object/dist'),p=require('@stdlib/assert-has-own-property/dist'),O=require('@stdlib/assert-is-boolean/dist').isPrimitive,j=require('@stdlib/assert-is-integer-array/dist').primitives,A=require('@stdlib/assert-is-empty-collection/dist'),R=require('@stdlib/ndarray-base-to-unique-normalized-indices/dist'),v=require('@stdlib/array-base-join/dist'),t=require('@stdlib/error-tools-fmtprodmsg/dist');function S(r,i,e){var a;if(!T(e))return new TypeError(t('null2V',e));if(p(e,"keepdims")&&(r.keepdims=e.keepdims,!O(r.keepdims)))return new TypeError(t('null2o',"keepdims",r.keepdims));if(p(e,"dims")){if(r.dims=e.dims,!j(r.dims)&&!A(r.dims))return new TypeError(t('nullHk',"dims",r.dims));if(a=R(r.dims,i-1),a===null)return new RangeError(t('nullHl',"dims",v(r.dims,",")));if(a.length!==r.dims.length)return new Error(t('nullHu',"dims",v(r.dims,",")));if(a.length>i)return new RangeError(t('nullHm',i,v(r.dims,",")));r.dims=a}return null}f.exports=S -});var c=o(function(tr,g){ -var D=require('@stdlib/assert-is-ndarray-like/dist'),F=require('@stdlib/ndarray-base-unary-reduce-subarray/dist'),L=require('@stdlib/ndarray-base-count-truthy/dist'),V=require('@stdlib/ndarray-base-spread-dimensions/dist'),x=require('@stdlib/array-base-indices-complement/dist'),z=require('@stdlib/ndarray-shape/dist'),I=require('@stdlib/ndarray-base-order/dist'),N=require('@stdlib/ndarray-empty/dist'),P=require('@stdlib/ndarray-defaults/dist'),C=require('@stdlib/array-base-take-indexed/dist'),U=require('@stdlib/array-base-zero-to/dist'),_=require('@stdlib/object-assign/dist'),B=require('@stdlib/error-tools-fmtprodmsg/dist'),Y=m(),G=l(),H=P.get("dtypes.integer_index");function J(r,i){var e,a,n,s,q,u,d;if(!D(r))throw new TypeError(B('null5t',r));if(s=z(r),u=s.length,e=_({},Y),arguments.length>1&&(a=G(e,u,i),a))throw a;return e.dims===null&&(e.dims=U(u)),n=x(u,e.dims),q=C(s,n),d=N(q,{dtype:H,order:I(r)}),F(L,[r,d],e.dims),e.keepdims&&(d=V(u,d,n)),d}g.exports=J -});var w=o(function(ur,h){ -var y=require('@stdlib/assert-is-ndarray-like/dist'),K=require('@stdlib/ndarray-base-unary-reduce-subarray/dist'),M=require('@stdlib/ndarray-ndims/dist'),Q=require('@stdlib/ndarray-base-count-truthy/dist'),W=require('@stdlib/object-assign/dist'),X=require('@stdlib/array-base-zero-to/dist'),b=require('@stdlib/error-tools-fmtprodmsg/dist'),Z=m(),$=l();function rr(r,i,e){var a,n,s;if(!y(r))throw new TypeError(b('null5t',r));if(!y(i))throw new TypeError(b('nullHp',i));if(s=M(r),a=W({},Z),arguments.length>2&&(n=$(a,s,e),n))throw n;return a.dims===null&&(a.dims=X(s)),K(Q,[r,i],a.dims),i}h.exports=rr -});var er=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),k=c(),ir=w();er(k,"assign",ir);module.exports=k; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 4096953..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/defaults.json", "../lib/validate.js", "../lib/main.js", "../lib/assign.js", "../lib/index.js"], - "sourcesContent": ["{\n \"dims\": null,\n \"keepdims\": false\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\nvar isIntegerArray = require( '@stdlib/assert-is-integer-array' ).primitives;\nvar isEmptyCollection = require( '@stdlib/assert-is-empty-collection' );\nvar normalizeIndices = require( '@stdlib/ndarray-base-to-unique-normalized-indices' );\nvar join = require( '@stdlib/array-base-join' );\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {NonNegativeInteger} ndims - number of input ndarray dimensions\n* @param {Options} options - function options\n* @param {boolean} [options.keepdims] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'keepdims': true\n* };\n* var err = validate( opts, 3, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, ndims, options ) {\n\tvar tmp;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'keepdims' ) ) {\n\t\topts.keepdims = options.keepdims;\n\t\tif ( !isBoolean( opts.keepdims ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'keepdims', opts.keepdims ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'dims' ) ) {\n\t\topts.dims = options.dims;\n\t\tif ( !isIntegerArray( opts.dims ) && !isEmptyCollection( opts.dims ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array of integers. Option: `%s`.', 'dims', opts.dims ) );\n\t\t}\n\t\ttmp = normalizeIndices( opts.dims, ndims-1 );\n\t\tif ( tmp === null ) {\n\t\t\treturn new RangeError( format( 'invalid option. `%s` option contains an out-of-bounds dimension index. Option: [%s].', 'dims', join( opts.dims, ',' ) ) );\n\t\t}\n\t\tif ( tmp.length !== opts.dims.length ) {\n\t\t\treturn new Error( format( 'invalid option. `%s` option contains duplicate indices. Option: [%s].', 'dims', join( opts.dims, ',' ) ) );\n\t\t}\n\t\tif ( tmp.length > ndims ) {\n\t\t\treturn new RangeError( format( 'invalid option. `%s` option specifies more dimensions than exists in the input array. Number of dimensions: %d. Option: [%s].', ndims, join( opts.dims, ',' ) ) );\n\t\t}\n\t\topts.dims = tmp;\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert-is-ndarray-like' );\nvar unaryReduceSubarray = require( '@stdlib/ndarray-base-unary-reduce-subarray' );\nvar base = require( '@stdlib/ndarray-base-count-truthy' );\nvar spreadDimensions = require( '@stdlib/ndarray-base-spread-dimensions' );\nvar indicesComplement = require( '@stdlib/array-base-indices-complement' );\nvar getShape = require( '@stdlib/ndarray-shape' ); // note: non-base accessor is intentional due to the input array originating in userland\nvar getOrder = require( '@stdlib/ndarray-base-order' );\nvar empty = require( '@stdlib/ndarray-empty' );\nvar defaults = require( '@stdlib/ndarray-defaults' );\nvar takeIndexed = require( '@stdlib/array-base-take-indexed' );\nvar zeroTo = require( '@stdlib/array-base-zero-to' );\nvar objectAssign = require( '@stdlib/object-assign' );\nvar format = require( '@stdlib/string-format' );\nvar DEFAULTS = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' );\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements along one or more ndarray dimensions.\n*\n* @param {ndarray} x - input ndarray\n* @param {Options} [options] - function options\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} options argument must be an object\n* @throws {RangeError} dimension indices must not exceed input ndarray bounds\n* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions\n* @throws {Error} must provide valid options\n* @returns {ndarray} output ndarray\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ndarray = require( '@stdlib/ndarray-ctor' );\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var sh = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );\n*\n* // Perform reduction:\n* var out = countTruthy( x );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\nfunction countTruthy( x, options ) {\n\tvar opts;\n\tvar err;\n\tvar idx;\n\tvar shx;\n\tvar shy;\n\tvar N;\n\tvar y;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\tshx = getShape( x );\n\tN = shx.length;\n\n\topts = objectAssign( {}, DEFAULTS );\n\tif ( arguments.length > 1 ) {\n\t\terr = validate( opts, N, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\t// When a list of dimensions is not provided, reduce the entire input array across all dimensions...\n\tif ( opts.dims === null ) {\n\t\topts.dims = zeroTo( N );\n\t}\n\t// Resolve the list of non-reduced dimensions:\n\tidx = indicesComplement( N, opts.dims );\n\n\t// Resolve the output array shape:\n\tshy = takeIndexed( shx, idx );\n\n\t// Initialize an output array whose shape matches that of the non-reduced dimensions and which has the same memory layout as the input array:\n\ty = empty( shy, {\n\t\t'dtype': DEFAULT_DTYPE,\n\t\t'order': getOrder( x )\n\t});\n\n\t// Perform the reduction:\n\tunaryReduceSubarray( base, [ x, y ], opts.dims );\n\n\t// Check whether we need to reinsert singleton dimensions which can be useful for broadcasting the returned output array to the shape of the original input array...\n\tif ( opts.keepdims ) {\n\t\ty = spreadDimensions( N, y, idx );\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = countTruthy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert-is-ndarray-like' );\nvar unaryReduceSubarray = require( '@stdlib/ndarray-base-unary-reduce-subarray' );\nvar ndims = require( '@stdlib/ndarray-ndims' );\nvar base = require( '@stdlib/ndarray-base-count-truthy' );\nvar objectAssign = require( '@stdlib/object-assign' );\nvar zeroTo = require( '@stdlib/array-base-zero-to' );\nvar format = require( '@stdlib/string-format' );\nvar defaults = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements along one or more ndarray dimensions and assigns the results to a provided output ndarray.\n*\n* @param {ndarray} x - input ndarray\n* @param {ndarray} y - output ndarray\n* @param {Options} [options] - function options\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} second argument must be an ndarray-like object\n* @throws {TypeError} options argument must be an object\n* @throws {Error} must provide valid options\n* @returns {ndarray} output ndarray\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ndarray = require( '@stdlib/ndarray-ctor' );\n* var empty = require( '@stdlib/ndarray-empty' );\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );\n*\n* // Create an output ndarray:\n* var y = empty( [], {\n* 'dtype': 'int32'\n* });\n*\n* // Perform reduction:\n* var out = assign( x, y );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\nfunction assign( x, y, options ) {\n\tvar opts;\n\tvar err;\n\tvar N;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\tif ( !isndarrayLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an ndarray-like object. Value: `%s`.', y ) );\n\t}\n\tN = ndims( x );\n\n\topts = objectAssign( {}, defaults );\n\tif ( arguments.length > 2 ) {\n\t\terr = validate( opts, N, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tif ( opts.dims === null ) {\n\t\topts.dims = zeroTo( N );\n\t}\n\tunaryReduceSubarray( base, [ x, y ], opts.dims ); // note: we assume that this lower-level function handles further validation of the output ndarray (e.g., expected shape, etc)\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Count the number of truthy elements along one or more ndarray dimensions.\n*\n* @module @stdlib/ndarray-count-truthy\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ndarray = require( '@stdlib/ndarray-ctor' );\n* var countTruthy = require( '@stdlib/ndarray-count-truthy' );\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var sh = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );\n*\n* // Perform reduction:\n* var out = countTruthy( x );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ndarray = require( '@stdlib/ndarray-ctor' );\n* var empty = require( '@stdlib/ndarray-empty' );\n* var countTruthy = require( '@stdlib/ndarray-count-truthy' );\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );\n*\n* // Create an output ndarray:\n* var y = empty( [], {\n* 'dtype': 'int32'\n* });\n*\n* // Perform reduction:\n* var out = countTruthy.assign( x, y );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n\n// exports: { \"assign\": \"main.assign\" }\n"], - "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,GAAAC,EAAA,CAAAA,EAAA,SACE,KAAQ,KACR,SAAY,EACd,ICHA,IAAAC,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cAsBA,IAAIC,EAAW,QAAS,gCAAiC,EACrDC,EAAa,QAAS,iCAAkC,EACxDC,EAAY,QAAS,2BAA4B,EAAE,YACnDC,EAAiB,QAAS,iCAAkC,EAAE,WAC9DC,EAAoB,QAAS,oCAAqC,EAClEC,EAAmB,QAAS,mDAAoD,EAChFC,EAAO,QAAS,yBAA0B,EAC1CC,EAAS,QAAS,uBAAwB,EA0B9C,SAASC,EAAUC,EAAMC,EAAOC,EAAU,CACzC,IAAIC,EACJ,GAAK,CAACZ,EAAUW,CAAQ,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AACf,EAAeU,CAAE,EACtB,MAAM,IAAI,UAAWJ,EAAQ,gFAAiFI,CAAE,CAAE,EAEnH,GAAK,CAACV,EAAeW,CAAE,EACtB,MAAM,IAAI,UAAWL,EAAQ,iFAAkFK,CAAE,CAAE,EAKpH,GAHAI,EAAIb,EAAOQ,CAAE,EAEbG,EAAOT,EAAc,CAAC,EAAGG,CAAS,EAC7B,UAAU,OAAS,IACvBO,EAAMN,EAAUK,EAAME,EAAGH,CAAQ,EAC5BE,GACJ,MAAMA,EAGR,OAAKD,EAAK,OAAS,OAClBA,EAAK,KAAOR,EAAQU,CAAE,GAEvBd,EAAqBE,EAAM,CAAEO,EAAGC,CAAE,EAAGE,EAAK,IAAK,EACxCF,CACR,CAKAZ,EAAO,QAAUU,KCtBjB,IAAIO,GAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,GAAS,IAKbF,GAAaC,EAAM,SAAUC,EAAO,EAKpC,OAAO,QAAUD", - "names": ["require_defaults", "__commonJSMin", "exports", "module", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isBoolean", "isIntegerArray", "isEmptyCollection", "normalizeIndices", "join", "format", "validate", "opts", "ndims", "options", "tmp", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "unaryReduceSubarray", "base", "spreadDimensions", "indicesComplement", "getShape", "getOrder", "empty", "defaults", "takeIndexed", "zeroTo", "objectAssign", "format", "DEFAULTS", "validate", "DEFAULT_DTYPE", "countTruthy", "x", "options", "opts", "err", "idx", "shx", "shy", "N", "y", "require_assign", "__commonJSMin", "exports", "module", "isndarrayLike", "unaryReduceSubarray", "ndims", "base", "objectAssign", "zeroTo", "format", "defaults", "validate", "assign", "x", "y", "options", "opts", "err", "N", "setReadOnly", "main", "assign"] -} diff --git a/docs/repl.txt b/docs/repl.txt deleted file mode 100644 index 09180e5..0000000 --- a/docs/repl.txt +++ /dev/null @@ -1,82 +0,0 @@ - -{{alias}}( x[, options] ) - Counts the number of truthy elements along one or more ndarray dimensions. - - Parameters - ---------- - x: ndarray - Input ndarray. - - options: Object (optional) - Function options. - - options.dims: Array (optional) - List of dimensions over which to perform a reduction. If not provided, - the function performs a reduction over all elements in a provided input - ndarray. - - options.keepdims: boolean (optional) - Boolean indicating whether the reduced dimensions should be included in - the returned ndarray as singleton dimensions. Default: false. - - Returns - ------- - out: ndarray - Output ndarray. When performing a reduction over all elements, the - function returns a zero-dimensional ndarray containing the result. - - Examples - -------- - > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1.0, 1.0 ], [ 0.0, 1.0 ] ] ); - > var y = {{alias}}( x ) - - > y.get() - 3 - > y = {{alias}}( x, { 'keepdims': true } ) - - > {{alias:@stdlib/ndarray/to-array}}( y ) - [ [ 3 ] ] - > y.get( 0, 0 ) - 3 - - -{{alias}}.assign( x, y[, options] ) - Counts the number of truthy elements along one or more ndarray dimensions - and assigns the results to a provided output ndarray. - - Parameters - ---------- - x: ndarray - Input ndarray. - - y: ndarray - Output ndarray. The output shape must match the shape of the non-reduced - dimensions of the input ndarray. - - options: Object (optional) - Function options. - - options.dims: Array (optional) - List of dimensions over which to perform a reduction. If not provided, - the function performs a reduction over all elements in a provided input - ndarray. - - Returns - ------- - y: ndarray - Output ndarray. - - Examples - -------- - > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1.0, 1.0 ], [ 0.0, 1.0 ] ] ); - > var y = {{alias:@stdlib/ndarray/from-scalar}}( 0, { 'dtype': 'int32' } ); - > var out = {{alias}}.assign( x, y ) - - > var bool = ( out === y ) - true - > y.get() - 3 - - See Also - -------- - diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts deleted file mode 100644 index e203179..0000000 --- a/docs/types/index.d.ts +++ /dev/null @@ -1,203 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2025 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 - -/// - -import { ArrayLike } from '@stdlib/types/array'; -import { ndarray, int32ndarray } from '@stdlib/types/ndarray'; - -/** -* Base options. -*/ -interface BaseOptions { - /** - * List of dimensions over which to perform the reduction. - */ - dims?: ArrayLike; -} - -/** -* Options. -*/ -interface Options extends BaseOptions { - /** - * Boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions. Default: `false`. - */ - keepdims?: boolean; -} - -/** -* Interface describing `countTruthy`. -*/ -interface CountTruthy { - /** - * Counts the number of truthy elements along one or more ndarray dimensions. - * - * @param x - input ndarray - * @param options - function options - * @param options.dims - list of dimensions over which to perform a reduction - * @param options.keepdims - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions (default: false) - * @returns output ndarray - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var ndarray = require( '@stdlib/ndarray-ctor' ); - * - * // Create a data buffer: - * var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); - * - * // Define the shape of the input array: - * var sh = [ 3, 1, 2 ]; - * - * // Define the array strides: - * var sx = [ 4, 4, 1 ]; - * - * // Define the index offset: - * var ox = 1; - * - * // Create an input ndarray: - * var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' ); - * - * // Perform reduction: - * var out = countTruthy( x ); - * // returns - * - * var v = out.get(); - * // returns 5 - */ - ( x: ndarray, options?: Options ): int32ndarray; // FIXME: update once `int64` dtype support; may require adding support for an output `dtype` option - - /** - * Counts the number of truthy elements along one or more ndarray dimensions and assigns the results to a provided output ndarray. - * - * @param x - input ndarray - * @param y - output ndarray - * @param options - function options - * @param options.dims - list of dimensions over which to perform a reduction - * @returns output ndarray - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var ndarray = require( '@stdlib/ndarray-ctor' ); - * var empty = require( '@stdlib/ndarray-empty' ); - * - * // Create a data buffer: - * var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); - * - * // Define the shape of the input array: - * var shape = [ 3, 1, 2 ]; - * - * // Define the array strides: - * var sx = [ 4, 4, 1 ]; - * - * // Define the index offset: - * var ox = 1; - * - * // Create an input ndarray: - * var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' ); - * - * // Create an output ndarray: - * var y = empty( [], { - * 'dtype': 'int32' - * }); - * - * // Perform reduction: - * var out = countTruthy.assign( x, y ); - * // returns - * - * var v = out.get(); - * // returns 5 - */ - assign( x: ndarray, y: T, options?: BaseOptions ): T; -} - -/** -* Counts the number of truthy elements along one or more ndarray dimensions. -* -* @param x - input ndarray -* @param options - function options -* @param options.dims - list of dimensions over which to perform a reduction -* @param options.keepdims - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions (default: false) -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* -* // Create a data buffer: -* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* -* // Define the shape of the input array: -* var sh = [ 3, 1, 2 ]; -* -* // Define the array strides: -* var sx = [ 4, 4, 1 ]; -* -* // Define the index offset: -* var ox = 1; -* -* // Create an input ndarray: -* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' ); -* -* // Perform reduction: -* var out = countTruthy( x ); -* // returns -* -* var v = out.get(); -* // returns 5 -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var empty = require( '@stdlib/ndarray-empty' ); -* -* // Create a data buffer: -* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* -* // Define the shape of the input array: -* var shape = [ 3, 1, 2 ]; -* -* // Define the array strides: -* var sx = [ 4, 4, 1 ]; -* -* // Define the index offset: -* var ox = 1; -* -* // Create an input ndarray: -* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' ); -* -* // Create an output ndarray: -* var y = empty( [], { -* 'dtype': 'int32' -* }); -* -* // Perform reduction: -* var out = countTruthy.assign( x, y ); -* // returns -* -* var v = out.get(); -* // returns 5 -*/ -declare var countTruthy: CountTruthy; - - -// EXPORTS // - -export = countTruthy; diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index b67a8cc..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2025 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 zeros = require( '@stdlib/ndarray-zeros' ); -import empty = require( '@stdlib/ndarray-empty' ); -import countTruthy = require( './index' ); - - -// TESTS // - -// The function returns an ndarray... -{ - const x = zeros( [ 2, 2 ] ); - - countTruthy( x ); // $ExpectType int32ndarray - countTruthy( x, {} ); // $ExpectType int32ndarray - countTruthy( x, { 'keepdims': true } ); // $ExpectType int32ndarray - countTruthy( x, { 'dims': [ 0 ] } ); // $ExpectType int32ndarray -} - -// The compiler throws an error if the function is provided a first argument which is not an ndarray... -{ - countTruthy( 5 ); // $ExpectError - countTruthy( true ); // $ExpectError - countTruthy( false ); // $ExpectError - countTruthy( null ); // $ExpectError - countTruthy( undefined ); // $ExpectError - countTruthy( {} ); // $ExpectError - countTruthy( [ 1 ] ); // $ExpectError - countTruthy( ( x: number ): number => x ); // $ExpectError - - countTruthy( 5, {} ); // $ExpectError - countTruthy( true, {} ); // $ExpectError - countTruthy( false, {} ); // $ExpectError - countTruthy( null, {} ); // $ExpectError - countTruthy( undefined, {} ); // $ExpectError - countTruthy( {}, {} ); // $ExpectError - countTruthy( [ 1 ], {} ); // $ExpectError - countTruthy( ( x: number ): number => x, {} ); // $ExpectError -} - -// The compiler throws an error if the function is provided a second argument which is not an object... -{ - const x = zeros( [ 2, 2 ] ); - - countTruthy( x, '5' ); // $ExpectError - countTruthy( x, 5 ); // $ExpectError - countTruthy( x, true ); // $ExpectError - countTruthy( x, false ); // $ExpectError - countTruthy( x, null ); // $ExpectError - countTruthy( x, [ 1 ] ); // $ExpectError - countTruthy( x, ( x: number ): number => x ); // $ExpectError -} - -// The compiler throws an error if the function is provided a `keepdims` option which is not a boolean... -{ - const x = zeros( [ 2, 2 ] ); - - countTruthy( x, { 'keepdims': '5' } ); // $ExpectError - countTruthy( x, { 'keepdims': 5 } ); // $ExpectError - countTruthy( x, { 'keepdims': null } ); // $ExpectError - countTruthy( x, { 'keepdims': [ 1 ] } ); // $ExpectError - countTruthy( x, { 'keepdims': {} } ); // $ExpectError - countTruthy( x, { 'keepdims': ( x: number ): number => x } ); // $ExpectError -} - -// The compiler throws an error if the function is provided a `dims` option which is not an array of numbers... -{ - const x = zeros( [ 2, 2 ] ); - - countTruthy( x, { 'dims': '5' } ); // $ExpectError - countTruthy( x, { 'dims': 5 } ); // $ExpectError - countTruthy( x, { 'dims': null } ); // $ExpectError - countTruthy( x, { 'dims': true } ); // $ExpectError - countTruthy( x, { 'dims': false } ); // $ExpectError - countTruthy( x, { 'dims': {} } ); // $ExpectError - countTruthy( x, { 'dims': ( x: number ): number => x } ); // $ExpectError -} - -// The compiler throws an error if the function is provided an unsupported number of arguments... -{ - const x = zeros( [ 2, 2 ] ); - - countTruthy(); // $ExpectError - countTruthy( x, {}, {} ); // $ExpectError -} - -// Attached to the function is an `assign` method which returns an ndarray... -{ - const x = zeros( [ 2, 2 ] ); - const y = empty( [], { 'dtype': 'int32' } ); - - countTruthy.assign( x, y ); // $ExpectType int32ndarray - countTruthy.assign( x, y, {} ); // $ExpectType int32ndarray - countTruthy.assign( x, y, { 'dims': [ 0 ] } ); // $ExpectType int32ndarray -} - -// The compiler throws an error if the `assign` method is provided a first argument which is not an ndarray... -{ - const y = empty( [], { 'dtype': 'int32' } ); - - countTruthy.assign( 5, y ); // $ExpectError - countTruthy.assign( true, y ); // $ExpectError - countTruthy.assign( false, y ); // $ExpectError - countTruthy.assign( null, y ); // $ExpectError - countTruthy.assign( undefined, y ); // $ExpectError - countTruthy.assign( {}, y ); // $ExpectError - countTruthy.assign( [ 1 ], y ); // $ExpectError - countTruthy.assign( ( x: number ): number => x, y ); // $ExpectError - - countTruthy.assign( 5, y, {} ); // $ExpectError - countTruthy.assign( true, y, {} ); // $ExpectError - countTruthy.assign( false, y, {} ); // $ExpectError - countTruthy.assign( null, y, {} ); // $ExpectError - countTruthy.assign( undefined, y, {} ); // $ExpectError - countTruthy.assign( {}, y, {} ); // $ExpectError - countTruthy.assign( [ 1 ], y, {} ); // $ExpectError - countTruthy.assign( ( x: number ): number => x, y, {} ); // $ExpectError -} - -// The compiler throws an error if the `assign` method is provided a second argument which is not an ndarray... -{ - const x = zeros( [ 2, 2 ] ); - - countTruthy.assign( x, 5 ); // $ExpectError - countTruthy.assign( x, true ); // $ExpectError - countTruthy.assign( x, false ); // $ExpectError - countTruthy.assign( x, null ); // $ExpectError - countTruthy.assign( x, undefined ); // $ExpectError - countTruthy.assign( x, {} ); // $ExpectError - countTruthy.assign( x, [ 1 ] ); // $ExpectError - countTruthy.assign( x, ( x: number ): number => x ); // $ExpectError - - countTruthy.assign( x, 5, {} ); // $ExpectError - countTruthy.assign( x, true, {} ); // $ExpectError - countTruthy.assign( x, false, {} ); // $ExpectError - countTruthy.assign( x, null, {} ); // $ExpectError - countTruthy.assign( x, undefined, {} ); // $ExpectError - countTruthy.assign( x, {}, {} ); // $ExpectError - countTruthy.assign( x, [ 1 ], {} ); // $ExpectError - countTruthy.assign( x, ( x: number ): number => x, {} ); // $ExpectError -} - -// The compiler throws an error if the `assign` method is provided a third argument which is not an object... -{ - const x = zeros( [ 2, 2 ] ); - const y = empty( [], { 'dtype': 'int32' } ); - - countTruthy.assign( x, y, '5' ); // $ExpectError - countTruthy.assign( x, y, 5 ); // $ExpectError - countTruthy.assign( x, y, true ); // $ExpectError - countTruthy.assign( x, y, false ); // $ExpectError - countTruthy.assign( x, y, null ); // $ExpectError - countTruthy.assign( x, y, [ 1 ] ); // $ExpectError - countTruthy.assign( x, y, ( x: number ): number => x ); // $ExpectError -} - -// The compiler throws an error if the function is provided a `dims` option which is not an array of numbers... -{ - const x = zeros( [ 2, 2 ] ); - const y = empty( [], { 'dtype': 'int32' } ); - - countTruthy.assign( x, y, { 'dims': '5' } ); // $ExpectError - countTruthy.assign( x, y, { 'dims': 5 } ); // $ExpectError - countTruthy.assign( x, y, { 'dims': null } ); // $ExpectError - countTruthy.assign( x, y, { 'dims': true } ); // $ExpectError - countTruthy.assign( x, y, { 'dims': false } ); // $ExpectError - countTruthy.assign( x, y, { 'dims': {} } ); // $ExpectError - countTruthy.assign( x, y, { 'dims': ( x: number ): number => x } ); // $ExpectError -} - -// The compiler throws an error if the function is provided an unsupported number of arguments... -{ - const x = zeros( [ 2, 2 ] ); - const y = empty( [], { 'dtype': 'int32' } ); - - countTruthy.assign(); // $ExpectError - countTruthy.assign( x ); // $ExpectError - countTruthy.assign( x, y, {}, {} ); // $ExpectError -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 31e0327..0000000 --- a/examples/index.js +++ /dev/null @@ -1,84 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2025 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 bernoulli = require( '@stdlib/random-base-bernoulli' ).factory; -var ndarray2array = require( '@stdlib/ndarray-to-array' ); -var fillBy = require( '@stdlib/ndarray-fill-by' ); -var zeros = require( '@stdlib/ndarray-zeros' ); -var countTruthy = require( './../lib' ); - -var x = zeros( [ 2, 4, 5 ], { - 'dtype': 'float64' -}); -x = fillBy( x, bernoulli( 0.90 ) ); -console.log( ndarray2array( x ) ); - -var y = countTruthy( x ); -console.log( 'countTruthy(x[:,:,:]) =' ); -console.log( y.get() ); - -y = countTruthy( x, { - 'dims': [ 0 ], - 'keepdims': true -}); -console.log( 'countTruthy(x[:,j,k]) =' ); -console.log( ndarray2array( y ) ); - -y = countTruthy( x, { - 'dims': [ 1 ], - 'keepdims': true -}); -console.log( 'countTruthy(x[i,:,k]) =' ); -console.log( ndarray2array( y ) ); - -y = countTruthy( x, { - 'dims': [ 2 ], - 'keepdims': true -}); -console.log( 'countTruthy(x[i,j,:]) =' ); -console.log( ndarray2array( y ) ); - -y = countTruthy( x, { - 'dims': [ 0, 1 ], - 'keepdims': true -}); -console.log( 'countTruthy(x[:,:,k]) =' ); -console.log( ndarray2array( y ) ); - -y = countTruthy( x, { - 'dims': [ 0, 2 ], - 'keepdims': true -}); -console.log( 'countTruthy(x[:,j,:]) =' ); -console.log( ndarray2array( y ) ); - -y = countTruthy( x, { - 'dims': [ 1, 2 ], - 'keepdims': true -}); -console.log( 'countTruthy(x[i,:,:]) =' ); -console.log( ndarray2array( y ) ); - -y = countTruthy( x, { - 'dims': [ 0, 1, 2 ], - 'keepdims': true -}); -console.log( 'countTruthy(x[:,:,:]) =' ); -console.log( ndarray2array( y ) ); diff --git a/index.js b/index.js new file mode 100644 index 0000000..6f07adc --- /dev/null +++ b/index.js @@ -0,0 +1,3 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("buffer")):"function"==typeof define&&define.amd?define(["buffer"],t):(r="undefined"!=typeof globalThis?globalThis:r||self).countTruthy=t(r.require$$0)}(this,(function(r){"use strict";var t="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function n(r){return"number"==typeof r}function o(r){var t,e="";for(t=0;t0&&(t-=1),e=o.toExponential(t)):e=o.toPrecision(r.precision),r.alternate||(e=c.call(e,w,"$1e"),e=c.call(e,v,"e"),e=c.call(e,y,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return e=c.call(e,p,"e+0$1"),e=c.call(e,d,"e-0$1"),r.alternate&&(e=c.call(e,g,"$1."),e=c.call(e,m,"$1.e")),o>=0&&r.sign&&(e=r.sign+e),e=r.specifier===h.call(r.specifier)?h.call(e):l.call(e)}function _(r){var t,e="";for(t=0;t127)throw new Error("invalid character code. Value: "+n.arg);n.arg=T(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":t||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,d=n.padRight,g=void 0,(g=p-c.length)<0?c:c=d?c+_(g):_(g)+c)),f+=n.arg||"",u+=1}return f}var j=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function O(r){var t={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(t.precision="1"),t}function S(r){var t,e,n,o;for(e=[],o=0,n=j.exec(r);n;)(t=r.slice(o,j.lastIndex-n[0].length)).length&&e.push(t),e.push(O(n)),o=j.lastIndex,n=j.exec(r);return(t=r.slice(o)).length&&e.push(t),e}function I(r){var t,e;if("string"!=typeof r)throw new TypeError(I("invalid argument. First argument must be a string. Value: `%s`.",r));for(t=[S(r)],e=1;eo&&(n=!1),!n&&!t)return 0;o=i}return n&&t?3:n?1:2}function cr(r,t){return t&&(2===r||3===r)}function pr(r,t){return t&&(1===r||3===r)}function dr(r,t,e){var n,o,i,a,f;for(n=r.length,o=e,i=e,f=0;f0?i+=a*(r[f]-1):a<0&&(o+=a*(r[f]-1))}return[o,i]}function gr(r){return r.re}function mr(r){return r.im}function yr(r){return"string"==typeof r}U(dr,"assign",(function(r,t,e,n){var o,i,a,f,s;for(o=r.length,i=e,a=e,s=0;s0?a+=f*(r[s]-1):f<0&&(i+=f*(r[s]-1))}return n[0]=i,n[1]=a,n}));var vr=String.prototype.valueOf;var wr=D();function br(r){return"object"==typeof r&&(r instanceof String||(wr?function(r){try{return vr.call(r),!0}catch(r){return!1}}(r):"[object String]"===Z(r)))}function _r(r){return yr(r)||br(r)}U(_r,"isPrimitive",yr),U(_r,"isObject",br);var Er=/[-\/\\^$*+?.()|[\]{}]/g;var xr=/./,Tr=or(),Ar=Tr.document&&Tr.document.childNodes,Vr=Int8Array;function jr(){return/^\s*function\s*([^(]*)/i}var Or=/^\s*function\s*([^(]*)/i;U(jr,"REGEXP",Or);var Sr=Array.isArray?Array.isArray:function(r){return"[object Array]"===Z(r)};function Ir(r){return null!==r&&"object"==typeof r}var Rr=function(r){if("function"!=typeof r)throw new TypeError(I("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!Sr(t))return!1;if(e=t.length,0===e)return!1;for(n=0;n=0&&"/"!==r[e];e--);return void 0===e||e<=0?r.replace(Er,"\\$&"):(t=(t=r.substring(1,e)).replace(Er,"\\$&"),r=r[0]+t+r.substring(e))}(t),"g");else if(!Cr(t))throw new TypeError(I("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",t));if(!yr(e)&&!Nr(e))throw new TypeError(I("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",e));return Ur(r,t,e)}var Yr={int8:"new Int8Array( [ {{data}} ] )",uint8:"new Uint8Array( [ {{data}} ] )",uint8c:"new Uint8ClampedArray( [ {{data}} ] )",int16:"new Int16Array( [ {{data}} ] )",uint16:"new Uint16Array( [ {{data}} ] )",int32:"new Int32Array( [ {{data}} ] )",uint32:"new Uint32Array( [ {{data}} ] )",float32:"new Float32Array( [ {{data}} ] )",float64:"new Float64Array( [ {{data}} ] )",generic:"[ {{data}} ]",binary:"new Buffer( [ {{data}} ] )",complex64:"new Complex64Array( [ {{data}} ] )",complex128:"new Complex128Array( [ {{data}} ] )"};var Dr="function"==typeof Uint8Array;function $r(r){return Dr&&r instanceof Uint8Array||"[object Uint8Array]"===Z(r)}var Wr="function"==typeof Uint8Array?Uint8Array:null;var Gr,zr="function"==typeof Uint8Array?Uint8Array:void 0;Gr=function(){var r,t;if("function"!=typeof Wr)return!1;try{r=$r(t=new Wr(t=[1,3.14,-3.14,256,257]))&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?zr:function(){throw new Error("not implemented")};var Jr=Gr,Zr="function"==typeof Uint16Array;var Kr="function"==typeof Uint16Array?Uint16Array:null;var qr,Xr="function"==typeof Uint16Array?Uint16Array:void 0;qr=function(){var r,t,e;if("function"!=typeof Kr)return!1;try{t=new Kr(t=[1,3.14,-3.14,65536,65537]),e=t,r=(Zr&&e instanceof Uint16Array||"[object Uint16Array]"===Z(e))&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?Xr:function(){throw new Error("not implemented")};var Hr,Qr=qr,rt={uint16:Qr,uint8:Jr};(Hr=new rt.uint16(1))[0]=4660;var tt=52===new rt.uint8(Hr.buffer)[0],et="function"==typeof ArrayBuffer;function nt(r){return et&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Z(r)}var ot="function"==typeof Float64Array;var it="function"==typeof Float64Array?Float64Array:null;var at,ft="function"==typeof Float64Array?Float64Array:void 0;at=function(){var r,t,e;if("function"!=typeof it)return!1;try{t=new it([1,3.14,-3.14,NaN]),e=t,r=(ot&&e instanceof Float64Array||"[object Float64Array]"===Z(e))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}()?ft:function(){throw new Error("not implemented")};var st=at,ut="function"==typeof ArrayBuffer?ArrayBuffer:null;var lt,ht="function"==typeof ArrayBuffer?ArrayBuffer:void 0;lt=function(){var r,t,e;if("function"!=typeof ut)return!1;try{(r=nt(e=new ut(16))&&"function"==typeof ut.isView)&&((t=new st(e))[0]=-3.14,t[1]=NaN,r=r&&ut.isView(t)&&16===e.byteLength&&-3.14===t[0]&&t[1]!=t[1])}catch(t){r=!1}return r}()?ht:function(){throw new Error("not implemented")};var ct=lt,pt="function"==typeof DataView;var dt="function"==typeof DataView?DataView:null;var gt,mt="function"==typeof DataView?DataView:void 0;gt=function(){var r,t,e,n;if("function"!=typeof dt)return!1;try{e=new ct(24),t=new dt(e,8),n=t,(r=(pt&&n instanceof DataView||"[object DataView]"===Z(n))&&"function"==typeof t.getFloat64&&"function"==typeof t.setFloat64)&&(t.setFloat64(0,-3.14),t.setFloat64(8,NaN),r=r&&t.buffer===e&&16===t.byteLength&&8===t.byteOffset&&-3.14===t.getFloat64(0)&&t.getFloat64(8)!=t.getFloat64(8))}catch(t){r=!1}return r}()?mt:function(){throw new Error("not implemented")};var yt=gt,vt="function"==typeof BigInt?BigInt:void 0,wt={all:["binary","bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"]},bt=/_and_generic$/;function _t(){var r,t,e;return 0===arguments.length?wt.all.slice():(e=!1,r=arguments[0],bt.test(r)&&"all"!==(r=Ur(r,bt,""))&&(e=!0),t=(t=wt[r])?t.slice():[],e&&t.length>0&&t.push("generic"),t)}function Et(){return{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256}}function xt(r,t,e){C(r,t,{configurable:!1,enumerable:!0,writable:!1,value:e})}function Tt(r){return Object.keys(Object(r))}var At,Vt=void 0!==Object.keys;function jt(r){return"[object Arguments]"===Z(r)}At=function(){return jt(arguments)}();var Ot=At;function St(r){return"number"==typeof r}var It=Number,Rt=It.prototype.toString;var Lt=D();function Ft(r){return"object"==typeof r&&(r instanceof It||(Lt?function(r){try{return Rt.call(r),!0}catch(r){return!1}}(r):"[object Number]"===Z(r)))}function Bt(r){return St(r)||Ft(r)}function Nt(r){return r!=r}function Mt(r){return St(r)&&Nt(r)}function kt(r){return Ft(r)&&Nt(r.valueOf())}function Ct(r){return Mt(r)||kt(r)}U(Bt,"isPrimitive",St),U(Bt,"isObject",Ft),U(Ct,"isPrimitive",Mt),U(Ct,"isObject",kt);var Ut=Number.POSITIVE_INFINITY,Pt=It.NEGATIVE_INFINITY,Yt=Math.floor;function Dt(r){return Yt(r)===r}function $t(r){return rPt&&Dt(r)}function Wt(r){return St(r)&&$t(r)}function Gt(r){return Ft(r)&&$t(r.valueOf())}function zt(r){return Wt(r)||Gt(r)}U(zt,"isPrimitive",Wt),U(zt,"isObject",Gt);var Jt=Object.prototype.propertyIsEnumerable;var Zt=!Jt.call("beep","0");function Kt(r,t){var e;return null!=r&&(!(e=Jt.call(r,t))&&Zt&&_r(r)?!Mt(t=+t)&&Wt(t)&&t>=0&&t=0&&r.length<=qt&&G(r,"callee")&&!Kt(r,"callee")},Ht=Array.prototype.slice;var Qt=Kt((function(){}),"prototype"),re=!Kt({toString:null},"toString"),te=9007199254740991;function ee(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Dt(r.length)&&r.length>=0&&r.length<=te}function ne(r,t,e){var n,o;if(!ee(r)&&!yr(r))throw new TypeError(I("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(0===(n=r.length))return-1;if(3===arguments.length){if(!Wt(e))throw new TypeError(I("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(e>=0){if(e>=n)return-1;o=e}else(o=n+e)<0&&(o=0)}else o=0;if(Ct(t)){for(;o0&&!G(r,"0"))for(f=0;f>>0,o=Yt(r/Ae),tt?(je.setUint32(0,i,tt),je.setUint32(4,o,tt)):(je.setUint32(0,o,tt),je.setUint32(4,i,tt)),a=0;a>>0,n=Yt(r/4294967296),e=new yt(t.buffer),tt?(e.setUint32(0,o,tt),e.setUint32(4,n,tt)):(e.setUint32(0,n,tt),e.setUint32(4,o,tt))),t}),"assign",Oe);var Se={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256},Ie=ye(),Re={throw:1,clamp:2,wrap:3,normalize:4};function Le(r,t,e,n,o,i){var a,f,s,u,l;if(!(this instanceof Le))return new Le(r,t,e,n,o,i);for(u=1,l=0;l=0;a--)r-=i=r%e[a],r/=e[a],o+=i*t[a];return this._accessors?this._buffer.get(o):this._buffer[o]})),U(Le.prototype,"set",(function(){var r,t;for(r=this._offset,t=0;t=0;f--)r-=a=r%n[f],r/=n[f],i+=a*e[f];return this._accessors?this._buffer.set(t,i):this._buffer[i]=t,this})),U(Le.prototype,"toString",(function(){var r,t,e,n,o,i;if(t=this._shape.length,e="ndarray( '"+(n=this._dtype)+"', ",r="",this._length<=100)if("complex64"===n||"complex128"===n)for(i=0;i=0;i--)r+=gr(o=this.iget(this._length-1-i))+", "+mr(o),i>0&&(r+=", ");else for(i=2;i>=0;i--)r+=this.iget(this._length-1-i),i>0&&(r+=", ")}if(e+=Pr(Yr[this.dtype],"{{data}}",r),e+=", ",e+=0===t?"[]":"[ "+this._shape.join(", ")+" ]",e+=", ",e+="[ ",0===t)e+="0";else for(i=0;i=0;o--)e[o]=n,n*=r[o];return e}(r)}U(Ze,"assign",(function(r,t,e){return"column-major"===t?function(r,t){var e,n;for(e=1,n=0;n=0;n--)t[n]=e,e*=r[n];return t}(r,e)}));var Ke="row-major";function qe(r,t){var e,n,o;return"object"!=typeof(o=r.strides)||null===o?0===(n=r.shape).length?[0]:("string"!=typeof(e=r.order)&&(e=Ke),Ze(n,e)):t?ze(o):o}function Xe(r,t){var e,n,o;for(n=r.length,e=0,o=0;ot?-1:r}function an(r,t){var e,n,o,i;for(e={},n=[],i=0;i=0}function Yn(r){return Gt(r)&&r.valueOf()>=0}function Dn(r){return Pn(r)||Yn(r)}U(Dn,"isPrimitive",Pn),U(Dn,"isObject",Yn);var $n=4294967295;function Wn(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Dt(r.length)&&r.length>=0&&r.length<=$n}function Gn(r){return"object"==typeof r&&null!==r&&!Sr(r)}function zn(r,t){if(!(this instanceof zn))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!St(r))throw new TypeError(I("invalid argument. Real component must be a number. Value: `%s`.",r));if(!St(t))throw new TypeError(I("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return C(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),C(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}U(zn,"BYTES_PER_ELEMENT",8),U(zn.prototype,"BYTES_PER_ELEMENT",8),U(zn.prototype,"byteLength",16),U(zn.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),U(zn.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var Jn="function"==typeof Math.fround?Math.fround:null,Zn=new dn(1);var Kn="function"==typeof Jn?Jn:function(r){return Zn[0]=r,Zn[0]};function qn(r,t){if(!(this instanceof qn))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!St(r))throw new TypeError(I("invalid argument. Real component must be a number. Value: `%s`.",r));if(!St(t))throw new TypeError(I("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return C(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Kn(r)}),C(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Kn(t)}),this}function Xn(r){return r instanceof zn||r instanceof qn||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function Hn(r){return Dt(r/2)}U(qn,"BYTES_PER_ELEMENT",4),U(qn.prototype,"BYTES_PER_ELEMENT",4),U(qn.prototype,"byteLength",8),U(qn.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),U(qn.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var Qn=8;function ro(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Qn}var to=16;function eo(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===to}function no(){return"function"==typeof z&&"symbol"==typeof z("foo")&&G(z,"iterator")&&"symbol"==typeof z.iterator}var oo=no()?Symbol.iterator:null;function io(r,t){if(!(this instanceof io))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!St(r))throw new TypeError(I("invalid argument. Real component must be a number. Value: `%s`.",r));if(!St(t))throw new TypeError(I("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return C(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Kn(r)}),C(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Kn(t)}),this}function ao(r){return r.re}function fo(r){return r.im}function so(r,t){return new dn(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function uo(r,t){return new st(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function lo(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(Wn(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!Xn(n))return new TypeError(I("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(ao(n),fo(n))}return t}U(io,"BYTES_PER_ELEMENT",4),U(io.prototype,"BYTES_PER_ELEMENT",4),U(io.prototype,"byteLength",8),U(io.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),U(io.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var ho=2*dn.BYTES_PER_ELEMENT,co=no();function po(r){return r instanceof yo||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function go(r){return r===yo||"Complex128Array"===r.name}function mo(r,t){return new io(r[t*=2],r[t+1])}function yo(){var r,t,e,n;if(t=arguments.length,!(this instanceof yo))return 0===t?new yo:1===t?new yo(arguments[0]):2===t?new yo(arguments[0],arguments[1]):new yo(arguments[0],arguments[1],arguments[2]);if(0===t)e=new dn(0);else if(1===t)if(Pn(arguments[0]))e=new dn(2*arguments[0]);else if(ee(arguments[0]))if((n=(e=arguments[0]).length)&&Sr(e)&&Xn(e[0])){if(e=function(r,t){var e,n,o,i;for(e=t.length,i=0,o=0;oe.byteLength-r)throw new RangeError(I("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*ho));e=new dn(e,r,2*n)}}return U(this,"_buffer",e),U(this,"_length",e.length/2),this}function vo(r,t){if(!(this instanceof vo))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!St(r))throw new TypeError(I("invalid argument. Real component must be a number. Value: `%s`.",r));if(!St(t))throw new TypeError(I("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return C(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),C(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}function wo(r){return r.re}function bo(r){return r.im}function _o(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(Wn(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!Xn(n))return new TypeError(I("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(wo(n),bo(n))}return t}U(yo,"BYTES_PER_ELEMENT",ho),U(yo,"name","Complex64Array"),U(yo,"from",(function(r){var t,e,n,o,i,a,f,s,u,l,h,c;if(!Nr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!Nr(n=arguments[1]))throw new TypeError(I("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(po(r)){if(s=r.length,n){for(i=(o=new this(s))._buffer,c=0,h=0;h=2))throw new TypeError(I("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));i[c]=l[0],i[c+1]=l[1]}c+=2}return o}return new this(r)}if(ee(r)){if(n){for(s=r.length,f=r.get&&r.set?ke("default"):Ye("default"),h=0;h=2))throw new TypeError(I("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));i[c]=l[0],i[c+1]=l[1]}c+=2}return o}return new this(r)}if(Gn(r)&&co&&Nr(r[oo])){if(!Nr((i=r[oo]()).next))throw new TypeError(I("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,o,i,a;for(n=[],a=-1;!(o=r.next()).done;)if(a+=1,Wn(i=t.call(e,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!Xn(i))return new TypeError(I("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));n.push(ao(i),fo(i))}return n}(i,n,t):lo(i),a instanceof Error)throw a;for(i=(o=new this(s=a.length/2))._buffer,h=0;h=this._length))return mo(this._buffer,r)})),ar(yo.prototype,"buffer",(function(){return this._buffer.buffer})),ar(yo.prototype,"byteLength",(function(){return this._buffer.byteLength})),ar(yo.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(yo.prototype,"BYTES_PER_ELEMENT",yo.BYTES_PER_ELEMENT),U(yo.prototype,"copyWithin",(function(r,t){if(!po(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),U(yo.prototype,"entries",(function(){var r,t,e,n,o,i,a;if(!po(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,i=-1,a=-2,U(e={},"next",(function(){var t;if(i+=1,o||i>=n)return{done:!0};return t=new io(r[a+=2],r[a+1]),{value:[i,t],done:!1}})),U(e,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),oo&&U(e,oo,(function(){return t.entries()})),e})),U(yo.prototype,"every",(function(r,t){var e,n;if(!po(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n1){if(!Dt(t))throw new TypeError(I("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=o)<0&&(t=0),arguments.length>2){if(!Dt(e))throw new TypeError(I("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=o)<0&&(e=0),e>o&&(e=o)}else e=o}else t=0,e=o;for(a=ao(r),f=fo(r),s=t;s=0;n--)if(o=mo(e,n),r.call(t,o,n,this))return o})),U(yo.prototype,"findLastIndex",(function(r,t){var e,n,o;if(!po(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(o=mo(e,n),r.call(t,o,n,this))return n;return-1})),U(yo.prototype,"forEach",(function(r,t){var e,n,o;if(!po(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n=this._length))return mo(this._buffer,r)})),U(yo.prototype,"includes",(function(r,t){var e,n,o,i,a;if(!po(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xn(r))throw new TypeError(I("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Dt(t))throw new TypeError(I("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=ao(r),i=fo(r),e=this._buffer,a=t;a1){if(!Dt(t))throw new TypeError(I("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=ao(r),i=fo(r),e=this._buffer,a=t;a1){if(!Dt(t))throw new TypeError(I("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(o=ao(r),i=fo(r),e=this._buffer,a=t;a>=0;a--)if(o===e[n=2*a]&&i===e[n+1])return a;return-1})),ar(yo.prototype,"length",(function(){return this._length})),U(yo.prototype,"map",(function(r,t){var e,n,o,i,a;if(!po(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(o=new this.constructor(this._length))._buffer,i=0;i1)n=t,i=0;else{if(0===o)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=mo(e,0),i=1}for(;i1){if(!Pn(e=arguments[1]))throw new TypeError(I("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Xn(r)){if(e>=this._length)throw new RangeError(I("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=ao(r),void(n[e+1]=fo(r))}if(po(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,u=n.byteOffset+e*ho,t.buffer===n.buffer&&t.byteOffsetu){for(o=new dn(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,u=n.byteOffset+e*ho,t.buffer===n.buffer&&t.byteOffsetu){for(o=new dn(a),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,s=0;sf&&(t=f)}}for(e=ro&&(t=o)}}return r>=o?(o=0,e=n.byteLength):r>=t?(o=0,e=n.byteOffset+r*ho):(o=t-r,e=n.byteOffset+r*ho),new this.constructor(n.buffer,e,o<0?0:o)})),U(yo.prototype,"toReversed",(function(){var r,t,e,n,o,i;if(!po(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,o=0;o=o)throw new RangeError(I("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Xn(t))throw new TypeError(I("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=ao(t),e[2*r+1]=fo(t),n})),U(vo,"BYTES_PER_ELEMENT",8),U(vo.prototype,"BYTES_PER_ELEMENT",8),U(vo.prototype,"byteLength",16),U(vo.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),U(vo.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var Eo=2*st.BYTES_PER_ELEMENT,xo=no();function To(r){return r instanceof jo||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ao(r){return r===jo||"Complex64Array"===r.name}function Vo(r,t){return new vo(r[t*=2],r[t+1])}function jo(){var r,t,e,n;if(t=arguments.length,!(this instanceof jo))return 0===t?new jo:1===t?new jo(arguments[0]):2===t?new jo(arguments[0],arguments[1]):new jo(arguments[0],arguments[1],arguments[2]);if(0===t)e=new st(0);else if(1===t)if(Pn(arguments[0]))e=new st(2*arguments[0]);else if(ee(arguments[0]))if((n=(e=arguments[0]).length)&&Sr(e)&&Xn(e[0])){if(e=function(r,t){var e,n,o,i;for(e=t.length,i=0,o=0;oe.byteLength-r)throw new RangeError(I("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Eo));e=new st(e,r,2*n)}}return U(this,"_buffer",e),U(this,"_length",e.length/2),this}U(jo,"BYTES_PER_ELEMENT",Eo),U(jo,"name","Complex128Array"),U(jo,"from",(function(r){var t,e,n,o,i,a,f,s,u,l,h,c;if(!Nr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ao(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!Nr(n=arguments[1]))throw new TypeError(I("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(To(r)){if(s=r.length,n){for(i=(o=new this(s))._buffer,c=0,h=0;h=2))throw new TypeError(I("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));i[c]=l[0],i[c+1]=l[1]}c+=2}return o}return new this(r)}if(ee(r)){if(n){for(s=r.length,f=r.get&&r.set?ke("default"):Ye("default"),h=0;h=2))throw new TypeError(I("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));i[c]=l[0],i[c+1]=l[1]}c+=2}return o}return new this(r)}if(Gn(r)&&xo&&Nr(r[oo])){if(!Nr((i=r[oo]()).next))throw new TypeError(I("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,o,i,a;for(n=[],a=-1;!(o=r.next()).done;)if(a+=1,Wn(i=t.call(e,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!Xn(i))return new TypeError(I("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));n.push(wo(i),bo(i))}return n}(i,n,t):_o(i),a instanceof Error)throw a;for(i=(o=new this(s=a.length/2))._buffer,h=0;h=this._length))return Vo(this._buffer,r)})),ar(jo.prototype,"buffer",(function(){return this._buffer.buffer})),ar(jo.prototype,"byteLength",(function(){return this._buffer.byteLength})),ar(jo.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(jo.prototype,"BYTES_PER_ELEMENT",jo.BYTES_PER_ELEMENT),U(jo.prototype,"copyWithin",(function(r,t){if(!To(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),U(jo.prototype,"entries",(function(){var r,t,e,n,o,i,a;if(!To(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,i=-1,a=-2,U(e={},"next",(function(){var t;if(i+=1,o||i>=n)return{done:!0};return t=new vo(r[a+=2],r[a+1]),{value:[i,t],done:!1}})),U(e,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),oo&&U(e,oo,(function(){return t.entries()})),e})),U(jo.prototype,"every",(function(r,t){var e,n;if(!To(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n1){if(!Dt(t))throw new TypeError(I("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=o)<0&&(t=0),arguments.length>2){if(!Dt(e))throw new TypeError(I("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=o)<0&&(e=0),e>o&&(e=o)}else e=o}else t=0,e=o;for(a=wo(r),f=bo(r),s=t;s=0;n--)if(o=Vo(e,n),r.call(t,o,n,this))return o})),U(jo.prototype,"findLastIndex",(function(r,t){var e,n,o;if(!To(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(o=Vo(e,n),r.call(t,o,n,this))return n;return-1})),U(jo.prototype,"forEach",(function(r,t){var e,n,o;if(!To(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n=this._length))return Vo(this._buffer,r)})),ar(jo.prototype,"length",(function(){return this._length})),U(jo.prototype,"includes",(function(r,t){var e,n,o,i,a;if(!To(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xn(r))throw new TypeError(I("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Dt(t))throw new TypeError(I("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=wo(r),i=bo(r),e=this._buffer,a=t;a1){if(!Dt(t))throw new TypeError(I("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=wo(r),i=bo(r),e=this._buffer,a=t;a1){if(!Dt(t))throw new TypeError(I("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(o=wo(r),i=bo(r),e=this._buffer,a=t;a>=0;a--)if(o===e[n=2*a]&&i===e[n+1])return a;return-1})),U(jo.prototype,"map",(function(r,t){var e,n,o,i,a;if(!To(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(o=new this.constructor(this._length))._buffer,i=0;i1)n=t,i=0;else{if(0===o)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Vo(e,0),i=1}for(;i1){if(!Pn(e=arguments[1]))throw new TypeError(I("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Xn(r)){if(e>=this._length)throw new RangeError(I("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=wo(r),void(n[e+1]=bo(r))}if(To(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,u=n.byteOffset+e*Eo,t.buffer===n.buffer&&t.byteOffsetu){for(o=new st(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,u=n.byteOffset+e*Eo,t.buffer===n.buffer&&t.byteOffsetu){for(o=new st(a),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,s=0;sf&&(t=f)}}for(e=ro&&(t=o)}}return r>=o?(o=0,e=n.byteLength):r>=t?(o=0,e=n.byteOffset+r*Eo):(o=t-r,e=n.byteOffset+r*Eo),new this.constructor(n.buffer,e,o<0?0:o)})),U(jo.prototype,"toReversed",(function(){var r,t,e,n,o,i;if(!To(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,o=0;o=o)throw new RangeError(I("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Xn(t))throw new TypeError(I("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=wo(t),e[2*r+1]=bo(t),n}));var Oo=[st,dn,Tn,wn,Sn,Qr,Un,Jr,Bn,yo,jo],So=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128"],Io=So.length;function Ro(r){var t;if(Sr(r))return"generic";if(Lr(r))return null;for(t=0;t=0&&a=0&&!(((u=r[i])<0?-u:u)<=e);)r[i+1]=u,t[a+1]=t[a],i-=1,a-=1;r[i+1]=f,t[a+1]=s,n+=1,o+=1}}(t=ze(t),n),{sh:r=ko(r,n),sx:t,sy:e=ko(e,n)}}U(No,"assign",(function(r,t,e){var n=Lo(r);return n.accessorProtocol?"complex128"===n.dtype?Mo(r,uo(r,0),t,e):"complex64"===n.dtype?Mo(r,so(r,0),t,e):function(r,t,e){var n,o,i,a;for(n=r.data,o=r.accessors[1],a=e,i=0;a>=0&&a=0&&on?Uo.BLOCK_SIZE_IN_BYTES/e|0:Uo.BLOCK_SIZE_IN_BYTES/n|0}function Yo(r,t){var e,n;for(e=[],n=0;n1?arguments[1]:qo))return Do(r);if(e=function(r){return zo[r]||null}(t),null===e)throw new TypeError(I("invalid argument. Second argument must be a recognized data type. Value: `%s`.",t));return new e(r)}var Ho={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128",BooleanArray:"bool"};function Qo(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(K(e.value));return t}var ri=Jr.BYTES_PER_ELEMENT,ti=no();function ei(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===ri}function ni(r){return r===oi}function oi(){var r,t,e,n,o;if(t=arguments.length,!(this instanceof oi))return 0===t?new oi:1===t?new oi(arguments[0]):2===t?new oi(arguments[0],arguments[1]):new oi(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Jr(0);else if(1===t)if(Pn(o=arguments[0]))e=new Jr(o);else if(ee(o))e=function(r,t){var e,n;for(e=t.length,n=0;ne.byteLength-r)throw new RangeError(I("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*ri));e=new Jr(e,r,n)}}return U(this,"_buffer",e),U(this,"_length",e.length),this}U(oi,"BYTES_PER_ELEMENT",ri),U(oi,"name","BooleanArray"),U(oi,"from",(function(r){var t,e,n,o,i,a,f,s,u;if(!Nr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ni(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!Nr(n=arguments[1]))throw new TypeError(I("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(ee(r)){if(n){for(s=r.length,f=r.get&&r.set?ke("default"):Ye("default"),i=(o=new this(s))._buffer,u=0;u=0;o--)if(n=K(e[o]),r.call(t,n,o,this))return n})),U(oi.prototype,"findLastIndex",(function(r,t){var e,n,o;if(!ei(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,o=this._length-1;o>=0;o--)if(n=K(e[o]),r.call(t,n,o,this))return o;return-1})),U(oi.prototype,"get",(function(r){if(!ei(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Pn(r))throw new TypeError(I("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return K(this._buffer[r])})),ar(oi.prototype,"length",(function(){return this._length})),U(oi.prototype,"map",(function(r,t){var e,n,o,i;if(!ei(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Nr(r))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",r);for(o=this._buffer,e=(n=new this.constructor(this._length))._buffer,i=0;i1){if(!Pn(e=arguments[1]))throw new TypeError(I("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(ee(r)){if(e+(i=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=ei(r)?r._buffer:r,f=n.byteOffset+e*ri,t.buffer===n.buffer&&t.byteOffsetf){for(o=new Jr(t.length),a=0;a=this._length)throw new RangeError(I("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),U(oi.prototype,"sort",(function(r){var t;if(!ei(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!Nr(r))throw new TypeError(I("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(K(t),K(e))})),this})),U(oi.prototype,"toReversed",(function(){var r,t,e,n,o;if(!ei(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,o=0;o0&&t.push("generic"),t)}var ci=si(hi("complex_floating_point")),pi=si(hi("boolean"));function di(r,t){if(eo(r))return uo(r,t);if(ro(r))return so(r,t);throw new TypeError(I("invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.",r))}function gi(r,t){return new Jr(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,r.length-t)}function mi(r,t,e,n,o){var i,a;for(i=o,a=0;a=f&&(o=f-1);else if("wrap"===i)o<0?(o+=f)<0&&0!==(o%=f)&&(o+=f):o>=f&&(o-=f)>=f&&(o%=f);else if("normalize"===i&&o<0&&(o+=f),o<0||o>=f)throw new RangeError(I("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",f,o));if(s=e,"column-major"===n){for(l=0;l=0;l--)o-=u=o%r[l],o/=r[l],s+=u*t[l];return s}U(vi,"assign",yi);var bi="throw";var _i="throw";var Ei=[function(r,t,e){t[1].data[t[1].offset]=r(vi(t,1),e)},function(r,t,e,n,o){var i,a,f,s,u,l,h;for(f=(l=t[1]).shape[0],a=[n[0]],h=1;h0;){for(w0;){for(v0;){for(T0;){for(x0;){for(E0;){for(S0;){for(O0;){for(j0;){for(V0;){for(B0;){for(F0;){for(L0;){for(R0;){for(I0;){for(U0;){for(C0;){for(k0;){for(M0;){for(N0;){for(B0;){for(W0;){for($0;){for(D0;){for(Y0;){for(P0;){for(U0;){for(C0;){for(K0;){for(Z0;){for(J0;){for(z0;){for(G0;){for(W0;){for($0;){for(D0;){for(rr0;){for(Q0;){for(H0;){for(X0;){for(q0;){for(K0;){for(Z0;){for(J0;){for(z0;){for(ir0;){for(or0;){for(nr0;){for(er0;){for(tr0;){for(rr0;){for(Q0;){for(H0;){for(X0;){for(q0;){for(b0;){for(w0;){for(A0;){for(T0;){for(x0;){for(I0;){for(S0;){for(O0;){for(j0;){for(N0;){for(B0;){for(F0;){for(L0;){for(R0;){for(P0;){for(U0;){for(C0;){for(k0;){for(M0;){for(N0;){for(G0;){for(W0;){for($0;){for(D0;){for(Y0;){for(P0;){for(U0;){for(q0;){for(K0;){for(Z0;){for(J0;){for(z0;){for(G0;){for(W0;){for($0;){for(tr0;){for(rr0;){for(Q0;){for(H0;){for(X0;){for(q0;){for(K0;){for(Z0;){for(J0;){for(ar0;){for(ir0;){for(or0;){for(nr0;){for(er0;){for(tr0;){for(rr0;){for(Q0;){for(H0;){for(X3?n:{},x=t.length,s=[],O=0;Oi)throw new RangeError(I("invalid argument. Number of specified dimensions cannot exceed the number of dimensions in the input array. Number of dimensions: %d. Value: [%s].",i,Bo(e,",")));for(A=i-T,O=1;O2?n:{};return ji(r,t,e,o)}}));var Oi=8,Si=16;var Ii=1;var Ri=5;function Li(r,t,e,n){var o,i;if(r<=0||n<=0||1===t)return e;if(1===n){if((o=r%Ri)>0)for(i=0;i=0&&!(((u=r[i])<0?-u:u)<=e);)r[i+1]=u,t[a+1]=t[a],i-=1,a-=1;r[i+1]=f,t[a+1]=s,n+=1,o+=1}}(t=ze(t),e),{sh:r=ko(r,e),sx:t,idx:e}}U(Li,"ndarray",(function(r,t,e,n,o){var i,a,f;if(r<=0||1===t)return e;if(i=o,1===n){if((a=r%5)>0)for(f=0;f0;)for(m0;)for(g0;)for(_0;)for(b0;)for(w0;)for(V0;)for(A0;)for(T0;)for(x0;)for(R0;)for(I0;)for(S0;)for(O0;)for(j0;)for(M0;)for(N0;)for(B0;)for(F0;)for(L0;)for(R0;)for(Y0;)for(P0;)for(U0;)for(C0;)for(k0;)for(M0;)for(N0;)for(z0;)for(G0;)for(W0;)for($0;)for(D0;)for(Y0;)for(P0;)for(U0;)for(X0;)for(q0;)for(K0;)for(Z0;)for(J0;)for(z0;)for(G0;)for(W0;)for($0;)for(er0;)for(tr0;)for(rr0;)for(Q0;)for(H0;)for(X0;)for(q0;)for(K0;)for(Z0;)for(J0;)for(y0;)for(m0;)for(E0;)for(_0;)for(b0;)for(j0;)for(V0;)for(A0;)for(T0;)for(L0;)for(R0;)for(I0;)for(S0;)for(O0;)for(k0;)for(M0;)for(N0;)for(B0;)for(F0;)for(L0;)for(D0;)for(Y0;)for(P0;)for(U0;)for(C0;)for(k0;)for(M0;)for(J0;)for(z0;)for(G0;)for(W0;)for($0;)for(D0;)for(Y0;)for(P0;)for(H0;)for(X0;)for(q0;)for(K0;)for(Z0;)for(J0;)for(z0;)for(G0;)for(W0;)for(nr0;)for(er0;)for(tr0;)for(rr0;)for(Q0;)for(H0;)for(X0;)for(q0;)for(K0;)for(Z0;)for(m0;)for(g0;)for(_0;)for(b0;)for(w0;)for(V0;)for(A0;)for(T0;)for(x0;)for(R0;)for(I0;)for(S0;)for(O0;)for(j0;)for(M0;)for(N0;)for(B0;)for(F0;)for(L0;)for(R0;)for(Y0;)for(P0;)for(U0;)for(C0;)for(k0;)for(M0;)for(N0;)for(z0;)for(G0;)for(W0;)for($0;)for(D0;)for(Y0;)for(P0;)for(U0;)for(X0;)for(q0;)for(K0;)for(Z0;)for(J0;)for(z0;)for(G0;)for(W0;)for($0;)for(er0;)for(tr0;)for(rr0;)for(Q0;)for(H0;)for(X0;)for(q0;)for(K0;)for(Z0;)for(J(i=e(r,a)))return!1;o=i}return!0}function sa(r,t,e){var n,o,i,a,f,s,u,l,h,c,p;if(f=Je(t,!1),s=qe(t,!1),a=tn(t),i="row-major"===a,f.length>r)throw new RangeError(I("invalid argument. First argument must be greater than or equal to the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `%d`.",f.length,r));if(null===(u=an(e,r-1)))throw new RangeError(I("invalid argument. Specified dimension index is out-of-bounds. Must be on the interval: [-%u, %u]. Value: `[%s]`.",r,r-1,e.join(", ")));if(u.length!==e.length)throw new Error(I("invalid argument. Must provide unique dimension indices. Value: `[%s]`.",e.join(", ")));if(u.length!==f.length)throw new RangeError(I("invalid argument. Must provide the same number of dimension indices as the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `[%s]`.",f.length,e.join(", ")));if(u.length&&!fa(u))throw new Error(I("invalid argument. Must provide dimension indices which resolve to nonnegative indices arranged in ascending order. Value: `[%s]`.",e.join(", ")));if(0===f.length)o=function(r){return Yo(1,r)}(r),n=Do(r);else for(n=[],o=[],p=0,c=0;c=0&&r.length<=$n}var ga="function"==typeof Buffer?Buffer:null;var ma,ya=r.Buffer;ma=function(){var r,t;if("function"!=typeof ga)return!1;try{r=Lr(t="function"==typeof ga.from?ga.from([1,2,3,4]):new ga([1,2,3,4]))&&1===t[0]&&2===t[1]&&3===t[2]&&4===t[3]}catch(t){r=!1}return r}()?ya:function(){throw new Error("not implemented")};var va=ma;var wa=Nr(va.allocUnsafe)?function(r){if(!Dn(r))throw new TypeError(I("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));return va.allocUnsafe(r)}:function(r){if(!Dn(r))throw new TypeError(I("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));return new va(r)};var ba={float64:st,float32:dn,int16:Sn,int32:Tn,int8:Un,uint16:Qr,uint32:wn,uint8:Jr,uint8c:Bn,complex64:yo,complex128:jo};function _a(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var Ea={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},xa={"dtypes.default":Ea.dtypes.default,"dtypes.numeric":Ea.dtypes.numeric,"dtypes.real":Ea.dtypes.real,"dtypes.floating_point":Ea.dtypes.floating_point,"dtypes.real_floating_point":Ea.dtypes.real_floating_point,"dtypes.complex_floating_point":Ea.dtypes.complex_floating_point,"dtypes.integer":Ea.dtypes.integer,"dtypes.signed_integer":Ea.dtypes.signed_integer,"dtypes.unsigned_integer":Ea.dtypes.unsigned_integer};U(_a,"get",(function(r){var t=xa[r];return void 0===t?null:t}));var Ta,Aa=_a.get("dtypes.default");Ta=$r(wa(1))?function(r){var t,e,n,o,i,a;if(!Pn(r))throw new TypeError(I("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(n=arguments.length>1?arguments[1]:Aa))return Do(r);if(null===(t=sr(n)))throw new TypeError(I("invalid argument. Second argument must be a supported data type. Value: `%s`.",n));return o=function(r){return ba[r]||null}(n),a=t*r,"complex128"===n&&(a+=8),e=(i=wa(a)).byteOffset,"complex128"===n&&(Pn(e/t)||(e+=8)),new o(i.buffer,e,r)}:function(r){return arguments.length>1?Xo(r,arguments[1]):Xo(r)};var Va=Ta;function ja(r){if("function"!=typeof r)throw new TypeError(I("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!da(t))return!1;if(e=t.length,0===e)return!1;for(n=0;n0&&t.push("generic"),t)}function Ua(){return{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256}}U(Ca,"enum",Ua),function(r,t){var e,n,o;for(e=he(t),o=0;ot?t:r}function Ka(r,t){var e=t+1;return r<0?((r+=e)<0&&0!==(r%=e)&&(r+=e),r):r>t?((r-=e)>t&&(r%=e),r):r}var qa=si(we()),Xa={wrap:Ka,clamp:Za,normalize:function(r,t){var e=on(r,t);if(e<0||e>t)throw new RangeError(I("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return e},throw:function(r,t){if(r<0||r>t)throw new RangeError(I("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return r}};function Ha(r,t,e){var n;if("clamp"===e)return Za(r,t);if("wrap"===e)return Ka(r,t);if(n=r,"normalize"===e&&(n=on(n,t)),n<0||n>t)throw new RangeError(I("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return n}U(Ha,"factory",(function(r){if(!qa(r))throw new TypeError(I("invalid argument. First argument must be a recognized index mode. Value: `%s`.",r));return Xa[r]}));var Qa=Le.prototype.iget;var rf=Le.prototype.iset;function tf(r,t){var e,n;for(e=[],n=0;n0))throw new TypeError(I("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",e));if((f=e.length)>ef)throw new RangeError(I("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",ef,f));if(!Ra(n))throw new TypeError(I("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",n));if(f>0){if(n.length!==f)throw new RangeError(I("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",f,n.length))}else{if(1!==n.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==n[0])throw new RangeError(I("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",n[0]))}if(!Pn(o))throw new TypeError(I("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",o));if(!function(r){var t;for(t=0;t0&&!function(r,t,e,n){var o=dr(t,e,n);return o[0]>=0&&o[1]0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if((s={}).mode=nf,s.readonly=of,arguments.length>6&&(u=function(r,t){var e;if(!pa(t))return new TypeError(I("invalid argument. Options argument must be an object. Value: `%s`.",t));if(G(t,"mode")&&(r.mode=t.mode,!qa(r.mode)))return new TypeError(I("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",r.mode));if(G(t,"submode")){if(r.submode=t.submode,!Sr(r.submode))return new TypeError(I("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",r.submode));if(0===r.submode.length)return new TypeError(I("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",r.submode.join(",")));for(e=0;e0){if(!Wt(r))throw new TypeError(I("invalid argument. Index must be an integer. Value: `%s`.",r));return r=Ha(r,this._length-1,this._mode),Qa.call(this,r)}return Qa.call(this)})),U(af.prototype,"set",(function(){var r,t,e,n;if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(arguments.length!==this._ndims+1)throw new RangeError(I("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(r=this._offset,e=this._submode.length,n=0;n0){if(!Wt(r))throw new TypeError(I("invalid argument. Index must be an integer. Value: `%s`.",r));r=Ha(r,this._length-1,this._mode),rf.call(this,r,t)}else rf.call(this,r);return this}));var ff=Ya.get("dtypes.default"),sf=Ya.get("order");function uf(){var r,t=arguments,e="https://stdlib.io/e/"+t[0]+"?";for(r=1;rt)return new RangeError(uf("invalid option. `%s` option specifies more dimensions than exists in the input array. Number of dimensions: %d. Option: [%s].",t,Bo(r.dims,",")));r.dims=n}return null}var cf=Ya.get("dtypes.integer_index");function pf(r,t){var e,n,o,i,a,f;if(!Fe(r))throw new TypeError(uf("null5t",r));if(i=function(r){var t,e,n,o;if("object"!=typeof r||null===r)throw new TypeError(I("invalid argument. Must provide an ndarray. Value: `%s`.",r));if(!ee(e=r.shape))throw new TypeError(I("invalid argument. Must provide an ndarray. Value: `%s`.",r));for(t=[],o=0;o1&&(n=hf(e,a,t)))throw n;return null===e.dims&&(e.dims=No(a)),f=function(r){var t,e,n,o,i,a,f;if(o={},arguments.length>1){if(!pa(t=arguments[1]))throw new TypeError(I("invalid argument. Options argument must be an object. Value: `%s`.",t));e=G(t,"dtype")?t.dtype:ff,n=G(t,"order")?t.order:sf,G(t,"mode")&&(o.mode=t.mode),G(t,"submode")&&(o.submode=t.submode)}else e=ff,n=sf;if("number"==typeof r)f=[r];else{if(!da(r))throw new TypeError(I("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));f=r}if(f.length>0){if((i=We(f))!=i||i<0)throw new TypeError(I("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));a=Ze(f,n)}else i=1,a=[0];return new af(e,"binary"===e?wa(i):Va(i,e),f,a,Xe(f,a),n,o)}(ko(i,o=fn(a,e.dims)),{dtype:cf,order:tn(r)}),ji(zi,[r,f],e.dims),e.keepdims&&(f=sa(a,f,o)),f}return U(pf,"assign",(function(r,t,e){var n,o,i;if(!Fe(r))throw new TypeError(uf("null5t",r));if(!Fe(t))throw new TypeError(uf("invalid argument. Second argument must be an ndarray-like object. Value: `%s`.",t));if(i=function(r){var t,e;if("object"!=typeof r||null===r)throw new TypeError(I("invalid argument. Must provide an ndarray. Value: `%s`.",r));if(Pn(e=r.ndims))return e;if(!ee(t=r.shape))throw new TypeError(I("invalid argument. Must provide an ndarray. Value: `%s`.",r));return t.length}(r),n=ta({},lf),arguments.length>2&&(o=hf(n,i,e)))throw o;return null===n.dims&&(n.dims=No(i)),ji(zi,[r,t],n.dims),t})),pf})); +//# sourceMappingURL=index.js.map diff --git a/index.js.map b/index.js.map new file mode 100644 index 0000000..d3ba375 --- /dev/null +++ b/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-has-bigint-support/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/ndarray-base-bytes-per-element/lib/main.js","../node_modules/@stdlib/ndarray-base-iteration-order/lib/main.js","../node_modules/@stdlib/math-base-special-abs/lib/main.js","../node_modules/@stdlib/ndarray-base-strides2order/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/is_column_major_contiguous.js","../node_modules/@stdlib/ndarray-base-ctor/lib/is_row_major_contiguous.js","../node_modules/@stdlib/ndarray-base-minmax-view-buffer-index/lib/main.js","../node_modules/@stdlib/complex-float64-real/lib/main.js","../node_modules/@stdlib/complex-float64-imag/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/ndarray-base-minmax-view-buffer-index/lib/index.js","../node_modules/@stdlib/ndarray-base-minmax-view-buffer-index/lib/assign.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-escape-regexp-string/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/assert-is-regexp/lib/exec.js","../node_modules/@stdlib/assert-is-regexp/lib/main.js","../node_modules/@stdlib/assert-is-regexp/lib/try2exec.js","../node_modules/@stdlib/string-base-replace/lib/main.js","../node_modules/@stdlib/string-replace/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/tostring.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-little-endian/lib/main.js","../node_modules/@stdlib/assert-is-little-endian/lib/ctors.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-has-arraybuffer-support/lib/arraybuffer.js","../node_modules/@stdlib/array-buffer/lib/main.js","../node_modules/@stdlib/array-buffer/lib/index.js","../node_modules/@stdlib/assert-has-arraybuffer-support/lib/main.js","../node_modules/@stdlib/array-buffer/lib/polyfill.js","../node_modules/@stdlib/assert-is-dataview/lib/main.js","../node_modules/@stdlib/assert-has-dataview-support/lib/dataview.js","../node_modules/@stdlib/array-dataview/lib/main.js","../node_modules/@stdlib/array-dataview/lib/index.js","../node_modules/@stdlib/assert-has-dataview-support/lib/main.js","../node_modules/@stdlib/array-dataview/lib/polyfill.js","../node_modules/@stdlib/bigint-ctor/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/node_modules/@stdlib/ndarray-dtypes/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/node_modules/@stdlib/ndarray-dtypes/lib/enum.js","../node_modules/@stdlib/utils-define-read-only-property/lib/main.js","../node_modules/@stdlib/utils-keys/lib/builtin.js","../node_modules/@stdlib/utils-keys/lib/has_builtin.js","../node_modules/@stdlib/assert-is-arguments/lib/detect.js","../node_modules/@stdlib/assert-is-arguments/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/math-base-assert-is-nan/lib/main.js","../node_modules/@stdlib/assert-is-nan/lib/primitive.js","../node_modules/@stdlib/assert-is-nan/lib/object.js","../node_modules/@stdlib/assert-is-nan/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/assert-is-nan/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/native.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/has_string_enumerability_bug.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-is-arguments/lib/index.js","../node_modules/@stdlib/assert-is-arguments/lib/polyfill.js","../node_modules/@stdlib/utils-keys/lib/builtin_wrapper.js","../node_modules/@stdlib/utils-keys/lib/has_enumerable_prototype_bug.js","../node_modules/@stdlib/utils-noop/lib/main.js","../node_modules/@stdlib/utils-keys/lib/has_non_enumerable_properties_bug.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/utils-index-of/lib/main.js","../node_modules/@stdlib/utils-keys/lib/is_constructor_prototype.js","../node_modules/@stdlib/utils-keys/lib/window.js","../node_modules/@stdlib/utils-keys/lib/has_automation_equality_bug.js","../node_modules/@stdlib/utils-keys/lib/has_window.js","../node_modules/@stdlib/utils-keys/lib/main.js","../node_modules/@stdlib/utils-keys/lib/has_arguments_bug.js","../node_modules/@stdlib/utils-keys/lib/polyfill.js","../node_modules/@stdlib/utils-keys/lib/is_constructor_prototype_wrapper.js","../node_modules/@stdlib/ndarray-base-ctor/node_modules/@stdlib/ndarray-dtypes/lib/index.js","../node_modules/@stdlib/ndarray-base-ctor/node_modules/@stdlib/ndarray-dtypes/lib/assign.js","../node_modules/@stdlib/ndarray-orders/lib/main.js","../node_modules/@stdlib/blas-base-layouts/lib/enum.js","../node_modules/@stdlib/blas-base-layouts/lib/index.js","../node_modules/@stdlib/blas-base-layouts/lib/main.js","../node_modules/@stdlib/ndarray-orders/lib/enum.js","../node_modules/@stdlib/ndarray-orders/lib/index.js","../node_modules/@stdlib/ndarray-index-modes/lib/main.js","../node_modules/@stdlib/ndarray-index-modes/lib/enum.js","../node_modules/@stdlib/ndarray-index-modes/lib/index.js","../node_modules/@stdlib/ndarray-base-ctor/lib/meta2dataview.js","../node_modules/@stdlib/number-float64-base-to-int64-bytes/lib/assign.js","../node_modules/@stdlib/number-float64-base-to-int64-bytes/lib/index.js","../node_modules/@stdlib/number-float64-base-to-int64-bytes/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/meta2dataview.polyfill.js","../node_modules/@stdlib/ndarray-base-ctor/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/is_contiguous.js","../node_modules/@stdlib/assert-is-ndarray-like/lib/main.js","../node_modules/@stdlib/ndarray-base-ctor/lib/copy_flags.js","../node_modules/@stdlib/ndarray-base-ctor/lib/get.js","../node_modules/@stdlib/ndarray-base-ctor/lib/iget.js","../node_modules/@stdlib/ndarray-base-ctor/lib/set.js","../node_modules/@stdlib/ndarray-base-ctor/lib/iset.js","../node_modules/@stdlib/ndarray-base-ctor/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-accessor-array/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-setter/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-setter/lib/main.js","../node_modules/@stdlib/ndarray-base-numel/lib/main.js","../node_modules/@stdlib/ndarray-base-dtype/lib/main.js","../node_modules/@stdlib/array-base-copy-indexed/lib/main.js","../node_modules/@stdlib/ndarray-base-shape/lib/main.js","../node_modules/@stdlib/ndarray-base-shape2strides/lib/main.js","../node_modules/@stdlib/ndarray-base-shape2strides/lib/index.js","../node_modules/@stdlib/ndarray-base-shape2strides/lib/assign.js","../node_modules/@stdlib/ndarray-base-strides/lib/main.js","../node_modules/@stdlib/ndarray-base-strides2offset/lib/main.js","../node_modules/@stdlib/ndarray-base-offset/lib/main.js","../node_modules/@stdlib/ndarray-base-order/lib/main.js","../node_modules/@stdlib/ndarray-base-data-buffer/lib/main.js","../node_modules/@stdlib/ndarray-base-ndarraylike2object/lib/main.js","../node_modules/@stdlib/ndarray-base-normalize-index/lib/main.js","../node_modules/@stdlib/ndarray-base-to-unique-normalized-indices/lib/main.js","../node_modules/@stdlib/array-base-indices-complement/lib/main.js","../node_modules/@stdlib/array-base-take-indexed2/lib/main.js","../node_modules/@stdlib/array-dtype/lib/ctor2dtype.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/complex-float64-ctor/lib/main.js","../node_modules/@stdlib/complex-float64-ctor/lib/tostring.js","../node_modules/@stdlib/complex-float64-ctor/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32-ctor/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32-ctor/lib/tostring.js","../node_modules/@stdlib/complex-float32-ctor/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-dtype/lib/ctors.js","../node_modules/@stdlib/array-dtype/lib/dtypes.js","../node_modules/@stdlib/array-dtype/lib/main.js","../node_modules/@stdlib/array-base-arraylike2object/lib/main.js","../node_modules/@stdlib/assert-is-undefined-or-null/lib/main.js","../node_modules/@stdlib/array-base-join/lib/main.js","../node_modules/@stdlib/array-base-zero-to/lib/main.js","../node_modules/@stdlib/array-base-zero-to/lib/assign.js","../node_modules/@stdlib/array-base-take-indexed/lib/main.js","../node_modules/@stdlib/ndarray-base-unary-loop-interchange-order/lib/main.js","../node_modules/@stdlib/ndarray-base-unary-loop-interchange-order/lib/sort2ins.js","../node_modules/@stdlib/array-base-zero-to/lib/index.js","../node_modules/@stdlib/ndarray-base-unary-tiling-block-size/lib/defaults.js","../node_modules/@stdlib/ndarray-base-unary-tiling-block-size/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/increment_offsets.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/set_view_offsets.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/offsets.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-without/node_modules/@stdlib/array-dtype/lib/ctor2dtype.js","../node_modules/@stdlib/array-bool/lib/from_iterator.js","../node_modules/@stdlib/array-bool/lib/main.js","../node_modules/@stdlib/array-bool/lib/from_array.js","../node_modules/@stdlib/array-bool/lib/from_iterator_map.js","../node_modules/@stdlib/array-base-without/node_modules/@stdlib/array-dtype/lib/ctors.js","../node_modules/@stdlib/array-base-without/node_modules/@stdlib/array-dtype/lib/dtypes.js","../node_modules/@stdlib/array-base-without/node_modules/@stdlib/array-dtype/lib/main.js","../node_modules/@stdlib/array-base-assert-contains/lib/factory.js","../node_modules/@stdlib/array-base-assert-contains/lib/index.js","../node_modules/@stdlib/array-base-assert-contains/lib/main.js","../node_modules/@stdlib/array-dtypes/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex-floating-point-data-type/lib/main.js","../node_modules/@stdlib/array-base-assert-is-boolean-data-type/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-boolean/lib/main.js","../node_modules/@stdlib/array-base-without/lib/assign.js","../node_modules/@stdlib/array-base-without/lib/main.js","../node_modules/@stdlib/ndarray-base-vind2bind/lib/main.js","../node_modules/@stdlib/array-base-without/lib/index.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/nd_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/nd.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/main.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/0d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/1d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/2d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/3d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/4d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/5d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/6d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/7d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/8d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/9d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/10d.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/0d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/1d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/2d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/3d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/4d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/5d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/6d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/7d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/8d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/9d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/10d_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/2d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/3d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/4d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/5d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/6d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/7d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/8d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/9d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/10d_blocked.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/2d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/3d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/4d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/5d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/6d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/7d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/8d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/9d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/10d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/initialize_array_views.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/index.js","../node_modules/@stdlib/ndarray-base-unary-reduce-subarray/lib/factory.js","../node_modules/@stdlib/array-base-assert-is-complex-typed-array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-booleanarray/lib/main.js","../node_modules/@stdlib/blas-base-gscal/lib/main.js","../node_modules/@stdlib/ndarray-base-nullary-loop-interchange-order/lib/main.js","../node_modules/@stdlib/ndarray-base-nullary-loop-interchange-order/lib/sort2ins.js","../node_modules/@stdlib/blas-base-gscal/lib/index.js","../node_modules/@stdlib/blas-base-gscal/lib/ndarray.js","../node_modules/@stdlib/ndarray-base-nullary-tiling-block-size/lib/defaults.js","../node_modules/@stdlib/ndarray-base-nullary-tiling-block-size/lib/main.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/nd_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/nd_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/nd.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/main.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/0d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/1d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/0d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/1d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/0d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/1d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_blocked.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_blocked_accessors.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/2d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/3d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/4d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/5d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/6d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/7d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/8d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/9d_blocked_complex.js","../node_modules/@stdlib/ndarray-base-count-truthy/lib/10d_blocked_complex.js","../node_modules/@stdlib/object-assign/lib/has_object_assign.js","../node_modules/@stdlib/object-assign/lib/builtin.js","../node_modules/@stdlib/utils-property-symbols/lib/has_builtin.js","../node_modules/@stdlib/object-ctor/lib/main.js","../node_modules/@stdlib/utils-property-symbols/lib/builtin.js","../node_modules/@stdlib/utils-property-symbols/lib/index.js","../node_modules/@stdlib/object-assign/lib/index.js","../node_modules/@stdlib/utils-property-symbols/lib/polyfill.js","../node_modules/@stdlib/utils-enumerable-properties/lib/main.js","../node_modules/@stdlib/object-assign/lib/polyfill.js","../node_modules/@stdlib/ndarray-base-flag/lib/main.js","../node_modules/@stdlib/ndarray-base-flags/lib/main.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/node_modules/@stdlib/array-dtype/lib/ctor2dtype.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/node_modules/@stdlib/array-dtype/lib/ctors.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/node_modules/@stdlib/array-dtype/lib/dtypes.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/node_modules/@stdlib/array-dtype/lib/main.js","../node_modules/@stdlib/array-base-assert-is-sorted-ascending/lib/main.js","../node_modules/@stdlib/ndarray-base-spread-dimensions/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-row-major-string/lib/main.js","../node_modules/@stdlib/array-base-ones/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-read-only/lib/main.js","../node_modules/@stdlib/utils-get-prototype-of/lib/native.js","../node_modules/@stdlib/utils-get-prototype-of/lib/detect.js","../node_modules/@stdlib/utils-get-prototype-of/lib/polyfill.js","../node_modules/@stdlib/utils-get-prototype-of/lib/proto.js","../node_modules/@stdlib/assert-is-plain-object/lib/main.js","../node_modules/@stdlib/utils-get-prototype-of/lib/main.js","../node_modules/@stdlib/assert-is-array-like/lib/main.js","../node_modules/@stdlib/assert-has-node-buffer-support/lib/buffer.js","../node_modules/@stdlib/buffer-ctor/lib/main.js","../node_modules/@stdlib/buffer-ctor/lib/index.js","../node_modules/@stdlib/assert-has-node-buffer-support/lib/main.js","../node_modules/@stdlib/buffer-ctor/lib/polyfill.js","../node_modules/@stdlib/buffer-alloc-unsafe/lib/index.js","../node_modules/@stdlib/buffer-alloc-unsafe/lib/has_alloc_unsafe.js","../node_modules/@stdlib/buffer-alloc-unsafe/lib/main.js","../node_modules/@stdlib/buffer-alloc-unsafe/lib/polyfill.js","../node_modules/@stdlib/array-typed-ctors/lib/ctors.js","../node_modules/@stdlib/array-empty/node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-empty/node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-empty/node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-empty/lib/main.js","../node_modules/@stdlib/array-empty/lib/index.js","../node_modules/@stdlib/array-empty/lib/is_buffer_uint8array.js","../node_modules/@stdlib/array-typed-ctors/lib/main.js","../node_modules/@stdlib/array-empty/lib/polyfill.js","../node_modules/@stdlib/assert-tools-array-like-function/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer-array/lib/index.js","../node_modules/@stdlib/assert-is-integer-array/lib/index.js","../node_modules/@stdlib/ndarray-base-assert-is-order/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/node_modules/@stdlib/ndarray-dtypes/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/node_modules/@stdlib/ndarray-dtypes/lib/enum.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/node_modules/@stdlib/ndarray-dtypes/lib/index.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/node_modules/@stdlib/ndarray-dtypes/lib/assign.js","../node_modules/@stdlib/ndarray-base-assert-is-data-type/lib/main.js","../node_modules/@stdlib/ndarray-defaults/lib/main.js","../node_modules/@stdlib/ndarray-defaults/lib/get.js","../node_modules/@stdlib/utils-inherit/lib/validate.js","../node_modules/@stdlib/ndarray-defaults/lib/index.js","../node_modules/@stdlib/utils-inherit/lib/native.js","../node_modules/@stdlib/utils-inherit/lib/polyfill.js","../node_modules/@stdlib/utils-inherit/lib/detect.js","../node_modules/@stdlib/ndarray-base-clamp-index/lib/main.js","../node_modules/@stdlib/ndarray-base-wrap-index/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-index-mode/lib/main.js","../node_modules/@stdlib/ndarray-base-ind/lib/factory.js","../node_modules/@stdlib/ndarray-base-ind/lib/main.js","../node_modules/@stdlib/ndarray-base-ind/lib/index.js","../node_modules/@stdlib/ndarray-ctor/lib/iget.js","../node_modules/@stdlib/ndarray-ctor/lib/iset.js","../node_modules/@stdlib/ndarray-ctor/lib/copy_array.js","../node_modules/@stdlib/ndarray-ctor/lib/main.js","../node_modules/@stdlib/ndarray-base-assert-is-buffer-length-compatible/lib/main.js","../node_modules/@stdlib/ndarray-ctor/lib/validate.js","../node_modules/@stdlib/utils-inherit/lib/main.js","../node_modules/@stdlib/ndarray-ctor/lib/get.js","../node_modules/@stdlib/ndarray-ctor/lib/set.js","../node_modules/@stdlib/ndarray-empty/lib/main.js","../node_modules/@stdlib/error-tools-fmtprodmsg/lib/main.js","../lib/validate.js","../node_modules/@stdlib/assert-is-empty-collection/lib/main.js","../lib/main.js","../node_modules/@stdlib/ndarray-shape/lib/main.js","../lib/index.js","../lib/assign.js","../node_modules/@stdlib/ndarray-ndims/lib/main.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e' );\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating whether a value is `NaN`.\n*\n* @private\n* @param {*} value - input value\n* @returns {boolean} boolean indicating whether a value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 4 );\n* // returns false\n*/\nfunction isnan( value ) { // explicitly define a function here instead of `@stdlib/math/base/assert/is-nan` in order to avoid circular dependencies\n\treturn ( value !== value );\n}\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\ttoken.arg = String( token.arg );\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ? String( token.arg ) : fromCharCode( num ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// VARIABLES //\n\nvar Global = getGlobal();\n\n\n// MAIN //\n\n/**\n* Tests for native `BigInt` support.\n*\n* @returns {boolean} boolean indicating if an environment has `BigInt` support\n*\n* @example\n* var bool = hasBigIntSupport();\n* // returns \n*/\nfunction hasBigIntSupport() {\n\treturn (\n\t\ttypeof Global.BigInt === 'function' &&\n\t\ttypeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals\n\t\ttypeof Global.BigInt( '1' ) === 'bigint' &&\n\t\ttypeof BigInt( '1' ) === 'bigint' // eslint-disable-line stdlib/require-globals, no-undef\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasBigIntSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport BYTES_PER_ELEMENT from './bytes_per_element.json';\n\n\n// MAIN //\n\n/**\n* Returns the number of bytes per element provided an underlying array data type.\n*\n* @param {string} dtype - data type\n* @returns {(NonNegativeInteger|null)} number of bytes per element\n*\n* @example\n* var nbytes = bytesPerElement( 'float64' );\n* // returns 8\n*\n* nbytes = bytesPerElement( 'generic' );\n* // returns null\n*/\nfunction bytesPerElement( dtype ) {\n\treturn BYTES_PER_ELEMENT[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default bytesPerElement;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns array iteration order.\n*\n* ## Notes\n*\n* - Return value key:\n*\n* - `0`: unordered (i.e., strides of mixed sign; e.g., `[ 9, -3, 1 ]`)\n* - `1`: ordered left-to-right (i.e., all nonnegative strides)\n* - `-1`: ordered right-to-left (i.e., all negative strides)\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} iteration order\n*\n* @example\n* var o = iterationOrder( [ 2, 1 ] );\n* // returns 1\n*\n* o = iterationOrder( [ -2, 1 ] );\n* // returns 0\n*\n* o = iterationOrder( [ -2, -1 ] );\n* // returns -1\n*/\nfunction iterationOrder( strides ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < strides.length; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\tif ( cnt === 0 ) {\n\t\t// All nonnegative strides:\n\t\treturn 1|0; // asm-type annotation\n\t}\n\tif ( cnt === strides.length ) {\n\t\t// All negative strides:\n\t\treturn -1|0; // asm-type annotation\n\t}\n\t// Strides of mixed signs:\n\treturn 0|0; // asm-type annotation\n}\n\n\n// EXPORTS //\n\nexport default iterationOrder;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the absolute value of a double-precision floating-point number `x`.\n*\n* @param {number} x - input value\n* @returns {number} absolute value\n*\n* @example\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* @example\n* var v = abs( 2.0 );\n* // returns 2.0\n*\n* @example\n* var v = abs( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( -0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( NaN );\n* // returns NaN\n*/\nfunction abs( x ) {\n\treturn Math.abs( x ); // eslint-disable-line stdlib/no-builtin-math\n}\n\n\n// EXPORTS //\n\nexport default abs;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport abs from '@stdlib/math-base-special-abs';\n\n\n// MAIN //\n\n/**\n* Determines the order of a multidimensional array based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} order\n*\n* @example\n* import strides2order from '@stdlib/ndarray-base-strides2order';\n*\n* var order = strides2order( [ 2, 1 ] );\n* // returns 1\n*\n* order = strides2order( [ 1, 2 ] );\n* // returns 2\n*\n* order = strides2order( [ 1, 1, 1 ] );\n* // returns 3\n*\n* order = strides2order( [ 2, 3, 1 ] );\n* // returns 0\n*/\nfunction strides2order( strides ) {\n\tvar column;\n\tvar ndims;\n\tvar row;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0|0; // 'none'\n\t}\n\tcolumn = true;\n\trow = true;\n\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( column && s2 < s1 ) {\n\t\t\tcolumn = false;\n\t\t} else if ( row && s2 > s1 ) {\n\t\t\trow = false;\n\t\t}\n\t\tif ( row || column ) {\n\t\t\ts1 = s2;\n\t\t} else {\n\t\t\treturn 0|0; // 'none'\n\t\t}\n\t}\n\tif ( row && column ) {\n\t\treturn 3|0; // 'both'\n\t}\n\tif ( row ) {\n\t\treturn 1|0; // 'row-major'\n\t}\n\treturn 2|0; // 'column-major'\n}\n\n\n// EXPORTS //\n\nexport default strides2order;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Determines if an array is column-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is column-major contiguous\n*/\nfunction isColumnMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 2 || order === 3 );\n}\n\n\n// EXPORTS //\n\nexport default isColumnMajorContiguous;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Determines if an array is row-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is row-major contiguous\n*/\nfunction isRowMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 1 || order === 3 );\n}\n\n\n// EXPORTS //\n\nexport default isRowMajorContiguous;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {Array} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn [ offset, offset ];\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\treturn [ min, max ];\n}\n\n\n// EXPORTS //\n\nexport default minmaxViewBufferIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @module @stdlib/ndarray-base-minmax-view-buffer-index\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view and assigns results to a provided output array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset, out ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\tout[ 0 ] = offset;\n\t\t\tout[ 1 ] = offset;\n\t\t\treturn out;\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\tout[ 0 ] = min;\n\tout[ 1 ] = max;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default minmaxViewBufferIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar RE_CHARS = /[-\\/\\\\^$*+?.()|[\\]{}]/g; // eslint-disable-line no-useless-escape\n\n\n// MAIN //\n\n/**\n* Escapes a regular expression string.\n*\n* @param {string} str - regular expression string\n* @throws {TypeError} first argument must be a string\n* @returns {string} escaped string\n*\n* @example\n* var str = rescape( '[A-Z]*' );\n* // returns '\\\\[A\\\\-Z\\\\]\\\\*'\n*/\nfunction rescape( str ) {\n\tvar len;\n\tvar s;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a regular expression string. Value: `%s`.', str ) );\n\t}\n\t// Check if the string starts with a forward slash...\n\tif ( str[ 0 ] === '/' ) {\n\t\t// Find the last forward slash...\n\t\tlen = str.length;\n\t\tfor ( i = len-1; i >= 0; i-- ) {\n\t\t\tif ( str[ i ] === '/' ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t// If we searched the string to no avail or if the first letter is not `/`, assume that the string is not of the form `/[...]/[guimy]`:\n\tif ( i === void 0 || i <= 0 ) {\n\t\treturn str.replace( RE_CHARS, '\\\\$&' );\n\t}\n\t// We need to de-construct the string...\n\ts = str.substring( 1, i );\n\n\t// Only escape the characters between the `/`:\n\ts = s.replace( RE_CHARS, '\\\\$&' );\n\n\t// Reassemble:\n\tstr = str[ 0 ] + s + str.substring( i );\n\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default rescape;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar exec = RegExp.prototype.exec; // non-generic\n\n\n// EXPORTS //\n\nexport default exec;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2exec.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a regular expression.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a regular expression\n*\n* @example\n* var bool = isRegExp( /\\.+/ );\n* // returns true\n*\n* @example\n* var bool = isRegExp( {} );\n* // returns false\n*/\nfunction isRegExp( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof RegExp ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object RegExp]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isRegExp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport exec from './exec.js';\n\n\n// MAIN //\n\n/**\n* Attempts to call a `RegExp` method.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if able to call a `RegExp` method\n*/\nfunction test( value ) {\n\ttry {\n\t\texec.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Replaces search occurrences with a replacement string.\n*\n* @param {string} str - input string\n* @param {RegExp} search - search expression\n* @param {(string|Function)} newval - replacement value or function\n* @returns {string} new string containing replacement(s)\n*\n* @example\n* var str = 'Hello World';\n* var out = replace( str, /world/i, 'Mr. President' );\n* // returns 'Hello Mr. President'\n*\n* @example\n* import capitalize from '@stdlib/string-base-capitalize';\n*\n* var str = 'Oranges and lemons say the bells of St. Clement\\'s';\n*\n* function replacer( match, p1 ) {\n* return capitalize( p1 );\n* }\n*\n* var out = replace( str, /([^\\s]*)/gi, replacer );\n* // returns 'Oranges And Lemons Say The Bells Of St. Clement\\'s'\n*/\nfunction replace( str, search, newval ) {\n\treturn str.replace( search, newval );\n}\n\n\n// EXPORTS //\n\nexport default replace;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport rescape from '@stdlib/utils-escape-regexp-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isRegExp from '@stdlib/assert-is-regexp';\nimport format from '@stdlib/string-format';\nimport base from '@stdlib/string-base-replace';\n\n\n// MAIN //\n\n/**\n* Replaces search occurrences with a replacement string.\n*\n* @param {string} str - input string\n* @param {(string|RegExp)} search - search expression\n* @param {(string|Function)} newval - replacement value or function\n* @throws {TypeError} first argument must be a string\n* @throws {TypeError} second argument argument must be a string or regular expression\n* @throws {TypeError} third argument must be a string or function\n* @returns {string} new string containing replacement(s)\n*\n* @example\n* var str = 'beep';\n* var out = replace( str, 'e', 'o' );\n* // returns 'boop'\n*\n* @example\n* var str = 'Hello World';\n* var out = replace( str, /world/i, 'Mr. President' );\n* // returns 'Hello Mr. President'\n*\n* @example\n* import capitalize from '@stdlib/string-capitalize';\n*\n* var str = 'Oranges and lemons say the bells of St. Clement\\'s';\n*\n* function replacer( match, p1 ) {\n* return capitalize( p1 );\n* }\n*\n* var out = replace( str, /([^\\s]*)/gi, replacer );\n* // returns 'Oranges And Lemons Say The Bells Of St. Clement\\'s'\n*/\nfunction replace( str, search, newval ) {\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\tif ( isString( search ) ) {\n\t\tsearch = new RegExp( rescape( search ), 'g' );\n\t} else if ( !isRegExp( search ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a string or regular expression. Value: `%s`.', search ) );\n\t}\n\tif ( !isString( newval ) && !isFunction( newval ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be a string or replacement function. Value: `%s`.', newval ) );\n\t}\n\treturn base( str, search, newval );\n}\n\n\n// EXPORTS //\n\nexport default replace;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport replace from '@stdlib/string-replace';\nimport real from '@stdlib/complex-float64-real';\nimport imag from '@stdlib/complex-float64-imag';\n\n\n// VARIABLES //\n\nvar CTORS = {\n\t'int8': 'new Int8Array( [ {{data}} ] )',\n\t'uint8': 'new Uint8Array( [ {{data}} ] )',\n\t'uint8c': 'new Uint8ClampedArray( [ {{data}} ] )',\n\t'int16': 'new Int16Array( [ {{data}} ] )',\n\t'uint16': 'new Uint16Array( [ {{data}} ] )',\n\t'int32': 'new Int32Array( [ {{data}} ] )',\n\t'uint32': 'new Uint32Array( [ {{data}} ] )',\n\t'float32': 'new Float32Array( [ {{data}} ] )',\n\t'float64': 'new Float64Array( [ {{data}} ] )',\n\t'generic': '[ {{data}} ]',\n\t'binary': 'new Buffer( [ {{data}} ] )',\n\t'complex64': 'new Complex64Array( [ {{data}} ] )',\n\t'complex128': 'new Complex128Array( [ {{data}} ] )'\n};\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {string} string representation\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar buffer;\n\tvar ndims;\n\tvar ctor;\n\tvar str;\n\tvar dt;\n\tvar v;\n\tvar i;\n\n\tndims = this._shape.length;\n\tdt = this._dtype;\n\n\t// Function to invoke to create an ndarray:\n\tstr = 'ndarray( \\''+dt+'\\', ';\n\n\t// Data buffer parameter...\n\tbuffer = '';\n\tif ( this._length <= 100 ) {\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// First three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbuffer += ', ..., ';\n\n\t\t// Last three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tv = this.iget( this._length-1-i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tbuffer += this.iget( this._length-1-i );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tctor = CTORS[ this.dtype ];\n\tstr += replace( ctor, '{{data}}', buffer );\n\tstr += ', ';\n\n\t// Array shape...\n\tif ( ndims === 0 ) {\n\t\tstr += '[]';\n\t} else {\n\t\tstr += '[ ' + this._shape.join( ', ' ) + ' ]';\n\t}\n\tstr += ', ';\n\n\t// Stride array...\n\tstr += '[ ';\n\tif ( ndims === 0 ) {\n\t\tstr += '0';\n\t} else {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( this._strides[ i ] < 0 ) {\n\t\t\t\tstr += -this._strides[ i ];\n\t\t\t} else {\n\t\t\t\tstr += this._strides[ i ];\n\t\t\t}\n\t\t\tif ( i < ndims-1 ) {\n\t\t\t\tstr += ', ';\n\t\t\t}\n\t\t}\n\t}\n\tstr += ' ]';\n\tstr += ', ';\n\n\t// Buffer offset:\n\tstr += '0';\n\tstr += ', ';\n\n\t// Order:\n\tstr += '\\'' + this._order + '\\'';\n\n\t// Close the function call:\n\tstr += ' )';\n\treturn str;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctors from './ctors.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if an environment is little endian.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment is little endian\n*\n* @example\n* var bool = isLittleEndian();\n* // returns \n*/\nfunction isLittleEndian() {\n\tvar uint16view;\n\tvar uint8view;\n\n\tuint16view = new ctors[ 'uint16' ]( 1 );\n\n\t/*\n\t* Set the uint16 view to a value having distinguishable lower and higher order words.\n\t*\n\t* 4660 => 0x1234 => 0x12 0x34 => '00010010 00110100' => (0x12,0x34) == (18,52)\n\t*/\n\tuint16view[ 0 ] = 0x1234;\n\n\t// Create a uint8 view on top of the uint16 buffer:\n\tuint8view = new ctors[ 'uint8' ]( uint16view.buffer );\n\n\t// If little endian, the least significant byte will be first...\n\treturn ( uint8view[ 0 ] === 0x34 );\n}\n\n\n// MAIN //\n\nbool = isLittleEndian();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint16Array from '@stdlib/array-uint16';\n\n\n// MAIN //\n\nvar ctors = {\n\t'uint16': Uint16Array,\n\t'uint8': Uint8Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @module @stdlib/array-buffer\n*\n* @example\n* import ctor from '@stdlib/array-buffer';\n*\n* var buf = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasArrayBufferSupport from '@stdlib/assert-has-arraybuffer-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasArrayBufferSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport Float64Array from '@stdlib/array-float64';\nimport GlobalArrayBuffer from './arraybuffer.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `ArrayBuffer` support.\n*\n* @returns {boolean} boolean indicating if an environment has `ArrayBuffer` support\n*\n* @example\n* var bool = hasArrayBufferSupport();\n* // returns \n*/\nfunction hasArrayBufferSupport() {\n\tvar bool;\n\tvar view;\n\tvar buf;\n\n\tif ( typeof GlobalArrayBuffer !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tbuf = new GlobalArrayBuffer( 16 );\n\t\tbool = ( isArrayBuffer( buf ) && typeof GlobalArrayBuffer.isView === 'function' );\n\t\tif ( bool ) {\n\t\t\tview = new Float64Array( buf );\n\t\t\tview[ 0 ] = -3.14;\n\t\t\tview[ 1 ] = NaN;\n\t\t\tbool = (\n\t\t\t\tbool &&\n\t\t\t\tGlobalArrayBuffer.isView( view ) &&\n\t\t\t\tbuf.byteLength === 16 &&\n\t\t\t\tview[ 0 ] === -3.14 &&\n\t\t\t\tview[ 1 ] !== view[ 1 ]\n\t\t\t);\n\t\t}\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasArrayBufferSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasDataView = ( typeof DataView === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `DataView`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a DataView\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import DataView from '@stdlib/array-dataview';\n*\n* var bool = isDataView( new DataView( new ArrayBuffer( 10 ) ) );\n* // returns true\n*\n* @example\n* var bool = isDataView( [] );\n* // returns false\n*/\nfunction isDataView( value ) {\n\treturn (\n\t\t( hasDataView && value instanceof DataView ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object DataView]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isDataView;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof DataView === 'function' ) ? DataView : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof DataView === 'function' ) ? DataView : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Constructor which returns a data view representing a provided array buffer.\n*\n* @module @stdlib/array-dataview\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import DataView from '@stdlib/array-dataview';\n*\n* var buf = new ArrayBuffer( 10 );\n* // returns \n*\n* var dv = new DataView( buf );\n* // returns \n*/\n\n// MODULES //\n\nimport hasDataViewSupport from '@stdlib/assert-has-dataview-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasDataViewSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isDataView from '@stdlib/assert-is-dataview';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport GlobalDataView from './dataview.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `DataView` support.\n*\n* @returns {boolean} boolean indicating if an environment has `DataView` support\n*\n* @example\n* var bool = hasDataViewSupport();\n* // returns \n*/\nfunction hasDataViewSupport() {\n\tvar bool;\n\tvar view;\n\tvar buf;\n\n\tif ( typeof GlobalDataView !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tbuf = new ArrayBuffer( 24 );\n\t\tview = new GlobalDataView( buf, 8 );\n\t\tbool = ( isDataView( view ) && typeof view.getFloat64 === 'function' && typeof view.setFloat64 === 'function' );\n\t\tif ( bool ) {\n\t\t\tview.setFloat64( 0, -3.14 );\n\t\t\tview.setFloat64( 8, NaN );\n\t\t\tbool = (\n\t\t\t\tbool &&\n\t\t\t\tview.buffer === buf &&\n\t\t\t\tview.byteLength === 16 &&\n\t\t\t\tview.byteOffset === 8 &&\n\t\t\t\tview.getFloat64( 0 ) === -3.14 &&\n\t\t\t\tview.getFloat64( 8 ) !== view.getFloat64( 8 )\n\t\t\t);\n\t\t}\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasDataViewSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Constructor which returns a data view representing a provided array buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* global BigInt */\n\n'use strict';\n\n// MAIN //\n\nvar BigInteger = ( typeof BigInt === 'function' ) ? BigInt : void 0; // eslint-disable-line stdlib/require-globals, node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nexport default BigInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport replace from '@stdlib/string-base-replace';\nimport DTYPES from './dtypes.json';\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of ndarray data types\n*\n* @example\n* var list = dtypes();\n* // returns [...]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable stdlib/empty-line-before-comment */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects. While certain dtypes, such as \"generic\" and \"binary\", have special behavior in JavaScript, they do not have a direct complement in C.\n*\n* @private\n* @returns {Object} object mapping supported dtypes to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `dtypes.h` enumeration!!!!\n\treturn {\n\t\t// Boolean data types:\n\t\t'bool': 0,\n\n\t\t// Integer data types:\n\t\t'int8': 1,\n\t\t'uint8': 2,\n\t\t'uint8c': 3,\n\t\t'int16': 4,\n\t\t'uint16': 5,\n\t\t'int32': 6,\n\t\t'uint32': 7,\n\t\t'int64': 8,\n\t\t'uint64': 9,\n\t\t// 'int128': 10, // uncomment once supported\n\t\t// 'uint128': 11,\n\t\t// 'int256': 12,\n\t\t// 'uint256': 13,\n\n\t\t// Floating-point data types:\n\t\t// 'float16': 14,\n\t\t// 'bfloat16': 15,\n\t\t'float32': 10,\n\t\t'float64': 11,\n\t\t// 'float128': 18, // uncomment once supported\n\n\t\t// Complex floating-point number data types:\n\t\t'complex64': 12,\n\t\t'complex128': 13,\n\n\t\t// Data type for \"binary\" data (i.e., data stored in a Node.js `Buffer` object):\n\t\t'binary': 14,\n\n\t\t// Data type for \"generic\" JavaScript values (objects):\n\t\t'generic': 15,\n\n\t\t// Define a signaling value which is guaranteed not to be a valid type enumeration value:\n\t\t'notype': 17,\n\n\t\t// Indicate the start of user defined type numbers (leaving room for type growth above):\n\t\t'userdefined_type': 256\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumeration;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.keys()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\treturn Object.keys( Object( value ) );\n}\n\n\n// EXPORTS //\n\nexport default keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof Object.keys !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArguments from './main.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment returns the expected internal class of the `arguments` object.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment behaves as expected\n*\n* @example\n* var bool = detect();\n* // returns \n*/\nfunction detect() {\n\treturn isArguments( arguments );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn ( nativeClass( value ) === '[object Arguments]' );\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is `NaN`.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 7.0 );\n* // returns false\n*/\nfunction isnan( x ) {\n\treturn ( x !== x );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `NaN` number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `NaN` number primitive\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a value of `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a value of `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( null );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is `NaN`.\n*\n* @module @stdlib/assert-is-nan\n*\n* @example\n* import isnan from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns false\n*\n* @example\n* import { isObject as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if an object's own property is enumerable.\n*\n* @private\n* @name isEnumerableProperty\n* @type {Function}\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nvar isEnumerableProperty = Object.prototype.propertyIsEnumerable;\n\n\n// EXPORTS //\n\nexport default isEnumerableProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isEnum from './native.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment has a bug where String indices are not detected as \"enumerable\" properties. Observed in Node v0.10.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment has the bug\n*/\nfunction detect() {\n\treturn !isEnum.call( 'beep', '0' );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isString from '@stdlib/assert-is-string';\nimport { isPrimitive as isnan } from '@stdlib/assert-is-nan';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport isEnum from './native.js';\nimport hasStringEnumBug from './has_string_enumerability_bug.js';\n\n\n// MAIN //\n\n/**\n* Tests if an object's own property is enumerable.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nfunction isEnumerableProperty( value, property ) {\n\tvar bool;\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\tbool = isEnum.call( value, property );\n\tif ( !bool && hasStringEnumBug && isString( value ) ) {\n\t\t// Note: we only check for indices, as properties attached to a `String` object are properly detected as enumerable above.\n\t\tproperty = +property;\n\t\treturn (\n\t\t\t!isnan( property ) &&\n\t\t\tisInteger( property ) &&\n\t\t\tproperty >= 0 &&\n\t\t\tproperty < value.length\n\t\t);\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default isEnumerableProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an `arguments` object.\n*\n* @module @stdlib/assert-is-arguments\n*\n* @example\n* import isArguments from '@stdlib/assert-is-arguments';\n*\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* bool = isArguments( [] );\n* // returns false\n*/\n\n// MODULES //\n\nimport hasArgumentsClass from './detect.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar isArguments;\nif ( hasArgumentsClass ) {\n\tisArguments = main;\n} else {\n\tisArguments = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\nimport isArray from '@stdlib/assert-is-array';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-uint32-max';\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object' &&\n\t\t!isArray( value ) &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH &&\n\t\thasOwnProp( value, 'callee' ) &&\n\t\t!isEnumerableProperty( value, 'callee' )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArguments from '@stdlib/assert-is-arguments';\nimport builtin from './builtin.js';\n\n\n// VARIABLES //\n\nvar slice = Array.prototype.slice;\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tif ( isArguments( value ) ) {\n\t\treturn builtin( slice.call( value ) );\n\t}\n\treturn builtin( value );\n}\n\n\n// EXPORTS //\n\nexport default keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\nimport noop from '@stdlib/utils-noop';\n\n\n// MAIN //\n\n// Note: certain environments treat an object's prototype as enumerable, which, as a matter of convention, it shouldn't be...\nvar bool = isEnumerableProperty( noop, 'prototype' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* No operation.\n*\n* @example\n* noop();\n* // ...does nothing.\n*/\nfunction noop() {\n\t// Empty function...\n}\n\n\n// EXPORTS //\n\nexport default noop;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\n\n\n// VARIABLES //\n\nvar obj = {\n\t'toString': null\n};\n\n\n// MAIN //\n\n// Note: certain environments don't allow enumeration of overwritten properties which are considered non-enumerable...\nvar bool = !isEnumerableProperty( obj, 'toString' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isnan from '@stdlib/assert-is-nan';\nimport isCollection from '@stdlib/assert-is-collection';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @param {ArrayLike} arr - array-like object\n* @param {*} searchElement - element to find\n* @param {integer} [fromIndex] - starting index (if negative, the start index is determined relative to last element)\n* @throws {TypeError} must provide an array-like object\n* @throws {TypeError} third argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 3 );\n* // returns 1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 5 );\n* // returns -1\n*\n* @example\n* // Using a `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, 3 );\n* // returns 5\n*\n* @example\n* // `fromIndex` which exceeds `array` length:\n* var arr = [ 1, 2, 3, 4, 2, 5 ];\n* var idx = indexOf( arr, 2, 10 );\n* // returns -1\n*\n* @example\n* // Negative `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6, 2 ];\n* var idx = indexOf( arr, 2, -4 );\n* // returns 5\n*\n* idx = indexOf( arr, 2, -1 );\n* // returns 7\n*\n* @example\n* // Negative `fromIndex` exceeding input `array` length:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, -10 );\n* // returns 1\n*\n* @example\n* // Array-like objects:\n* var str = 'bebop';\n* var idx = indexOf( str, 'o' );\n* // returns 3\n*/\nfunction indexOf( arr, searchElement, fromIndex ) {\n\tvar len;\n\tvar i;\n\tif ( !isCollection( arr ) && !isString( arr ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', arr ) );\n\t}\n\tlen = arr.length;\n\tif ( len === 0 ) {\n\t\treturn -1;\n\t}\n\tif ( arguments.length === 3 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= 0 ) {\n\t\t\tif ( fromIndex >= len ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\ti = fromIndex;\n\t\t} else {\n\t\t\ti = len + fromIndex;\n\t\t\tif ( i < 0 ) {\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\ti = 0;\n\t}\n\t// Check for `NaN`...\n\tif ( isnan( searchElement ) ) {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( isnan( arr[i] ) ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( arr[ i ] === searchElement ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n// EXPORTS //\n\nexport default indexOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests whether a value equals the prototype of its constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction isConstructorPrototype( value ) {\n\treturn ( value.constructor && value.constructor.prototype === value );\n}\n\n\n// EXPORTS //\n\nexport default isConstructorPrototype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar w = ( typeof window === 'undefined' ) ? void 0 : window;\n\n\n// EXPORTS //\n\nexport default w;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport indexOf from '@stdlib/utils-index-of';\nimport typeOf from '@stdlib/utils-type-of';\nimport isConstructorPrototype from './is_constructor_prototype.js';\nimport EXCLUDED_KEYS from './excluded_keys.json';\nimport win from './window.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Determines whether an environment throws when comparing to the prototype of a value's constructor (e.g., [IE9][1]).\n*\n* [1]: https://stackoverflow.com/questions/7688070/why-is-comparing-the-constructor-property-of-two-windows-unreliable\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment is buggy\n*/\nfunction check() {\n\tvar k;\n\tif ( typeOf( win ) === 'undefined' ) {\n\t\treturn false;\n\t}\n\tfor ( k in win ) { // eslint-disable-line guard-for-in\n\t\ttry {\n\t\t\tif (\n\t\t\t\tindexOf( EXCLUDED_KEYS, k ) === -1 &&\n\t\t\t\thasOwnProp( win, k ) &&\n\t\t\t\twin[ k ] !== null &&\n\t\t\t\ttypeOf( win[ k ] ) === 'object'\n\t\t\t) {\n\t\t\t\tisConstructorPrototype( win[ k ] );\n\t\t\t}\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// MAIN //\n\nbool = check();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof window !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasArgumentsBug from './has_arguments_bug.js';\nimport HAS_BUILTIN from './has_builtin.js';\nimport builtin from './builtin.js';\nimport wrapper from './builtin_wrapper.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @name keys\n* @type {Function}\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nvar keys;\nif ( HAS_BUILTIN ) {\n\tif ( hasArgumentsBug() ) {\n\t\tkeys = wrapper;\n\t} else {\n\t\tkeys = builtin;\n\t}\n} else {\n\tkeys = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport keys from './builtin.js';\n\n\n// FUNCTIONS //\n\n/**\n* Tests the built-in `Object.keys()` implementation when provided `arguments`.\n*\n* @private\n* @returns {boolean} boolean indicating whether the built-in implementation returns the expected number of keys\n*/\nfunction test() {\n\treturn ( keys( arguments ) || '' ).length !== 2;\n}\n\n\n// MAIN //\n\n/**\n* Tests whether the built-in `Object.keys()` implementation supports providing `arguments` as an input value.\n*\n* ## Notes\n*\n* - Safari 5.0 does **not** support `arguments` as an input value.\n*\n* @private\n* @returns {boolean} boolean indicating whether a built-in implementation supports `arguments`\n*/\nfunction check() {\n\treturn test( 1, 2 );\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArguments from '@stdlib/assert-is-arguments';\nimport HAS_ENUM_PROTO_BUG from './has_enumerable_prototype_bug.js';\nimport HAS_NON_ENUM_PROPS_BUG from './has_non_enumerable_properties_bug.js';\nimport isConstructorPrototype from './is_constructor_prototype_wrapper.js';\nimport NON_ENUMERABLE from './non_enumerable.json';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tvar skipConstructor;\n\tvar skipPrototype;\n\tvar isFcn;\n\tvar out;\n\tvar k;\n\tvar p;\n\tvar i;\n\n\tout = [];\n\tif ( isArguments( value ) ) {\n\t\t// Account for environments which treat `arguments` differently...\n\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\tout.push( i.toString() );\n\t\t}\n\t\t// Note: yes, we are precluding the `arguments` array-like object from having other enumerable properties; however, this should (1) be very rare and (2) not be encouraged (e.g., doing something like `arguments.a = 'b'`; in certain engines directly manipulating the `arguments` value results in automatic de-optimization).\n\t\treturn out;\n\t}\n\tif ( typeof value === 'string' ) {\n\t\t// Account for environments which do not treat string character indices as \"own\" properties...\n\t\tif ( value.length > 0 && !hasOwnProp( value, '0' ) ) {\n\t\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\t\tout.push( i.toString() );\n\t\t\t}\n\t\t}\n\t} else {\n\t\tisFcn = ( typeof value === 'function' );\n\t\tif ( isFcn === false && !isObjectLike( value ) ) {\n\t\t\treturn out;\n\t\t}\n\t\tskipPrototype = ( HAS_ENUM_PROTO_BUG && isFcn );\n\t}\n\tfor ( k in value ) {\n\t\tif ( !( skipPrototype && k === 'prototype' ) && hasOwnProp( value, k ) ) {\n\t\t\tout.push( String( k ) );\n\t\t}\n\t}\n\tif ( HAS_NON_ENUM_PROPS_BUG ) {\n\t\tskipConstructor = isConstructorPrototype( value );\n\t\tfor ( i = 0; i < NON_ENUMERABLE.length; i++ ) {\n\t\t\tp = NON_ENUMERABLE[ i ];\n\t\t\tif ( !( skipConstructor && p === 'constructor' ) && hasOwnProp( value, p ) ) {\n\t\t\t\tout.push( String( p ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasAutomationEqualityBug from './has_automation_equality_bug.js';\nimport isConstructorPrototype from './is_constructor_prototype.js';\nimport HAS_WINDOW from './has_window.js';\n\n\n// MAIN //\n\n/**\n* Wraps the test for constructor prototype equality to accommodate buggy environments (e.g., environments which throw when testing equality).\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction wrapper( value ) {\n\tif ( HAS_WINDOW === false && !hasAutomationEqualityBug ) {\n\t\treturn isConstructorPrototype( value );\n\t}\n\ttry {\n\t\treturn isConstructorPrototype( value );\n\t} catch ( error ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default wrapper;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types.\n*\n* @module @stdlib/ndarray-dtypes\n*\n* @example\n* import dtypes from '@stdlib/ndarray-dtypes';\n*\n* var list = dtypes();\n* // returns [...]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\nimport objectKeys from '@stdlib/utils-keys';\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ORDERS from './orders.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray orders.\n*\n* @returns {StringArray} list of ndarray orders\n*\n* @example\n* var list = orders();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\nfunction orders() {\n\treturn ORDERS.slice();\n}\n\n\n// EXPORTS //\n\nexport default orders;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported layouts to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 101`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of array objects.\n*\n* @returns {Object} object mapping supported layouts to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `layouts.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': 101,\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': 102\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of BLAS memory layouts.\n*\n* @module @stdlib/blas-base-layouts\n*\n* @example\n* import layouts from '@stdlib/blas-base-layouts';\n*\n* var list = layouts();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport DATA from './data.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of BLAS memory layouts.\n*\n* @returns {StringArray} list of memory layouts\n*\n* @example\n* var list = layouts();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\nfunction layouts() {\n\treturn DATA.slice();\n}\n\n\n// EXPORTS //\n\nexport default layouts;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { enum as layouts } from '@stdlib/blas-base-layouts';\n\n\n// VARIABLES //\n\nvar LAYOUTS = layouts();\n\n\n// MAIN //\n\n/**\n* Returns an object mapping supported orders to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported orders to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `orders.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': LAYOUTS[ 'row-major' ],\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': LAYOUTS[ 'column-major' ]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray orders.\n*\n* @module @stdlib/ndarray-orders\n*\n* @example\n* import orders from '@stdlib/ndarray-orders';\n*\n* var list = orders();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport MODES from './modes.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray index modes.\n*\n* @returns {StringArray} list of ndarray index modes\n*\n* @example\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nexport default modes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported index modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `throw == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported index modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `index_modes.h` enumeration!!!!\n\treturn {\n\t\t'throw': 1,\n\t\t'clamp': 2,\n\t\t'wrap': 3,\n\t\t'normalize': 4\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray index modes.\n*\n* @module @stdlib/ndarray-index-modes\n*\n* @example\n* import modes from '@stdlib/ndarray-index-modes';\n*\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport modes from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default modes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport DataView from '@stdlib/array-dataview';\nimport BigInt from '@stdlib/bigint-ctor';\nimport { enum as dtypes } from '@stdlib/ndarray-dtypes';\nimport { enum as orders } from '@stdlib/ndarray-orders';\nimport { enum as modes } from '@stdlib/ndarray-index-modes';\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tv.setBigInt64( o, BigInt( N ), IS_LITTLE_ENDIAN );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv.setBigInt64( o, BigInt( sh[i] ), IS_LITTLE_ENDIAN );\n\t\tv.setBigInt64( o+s, BigInt( st[i]*nbytes ), IS_LITTLE_ENDIAN );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tv.setBigInt64( o, BigInt( this._offset*nbytes ), IS_LITTLE_ENDIAN );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tv.setBigInt64( o, BigInt( M ), IS_LITTLE_ENDIAN );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default meta2dataview;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport Uint8Array from '@stdlib/array-uint8';\nimport DataView from '@stdlib/array-dataview';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\n// 0xFFFFFFFF = 2**32 - 1 => 11111111 11111111 11111111 11111111\nvar LOW_MASK = 0xFFFFFFFF >>> 0;\n\n// 2**32\nvar TWO_32 = 4294967296;\n\n// Byte array workspace:\nvar BYTES = new Uint8Array( 8 );\nvar VIEW = new DataView( BYTES.buffer );\n\n\n// MAIN //\n\n/**\n* Converts an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* ## Notes\n*\n* - This function assumes that the input value is less than the maximum safe double-precision floating-point integer plus one (i.e., `2**53`).\n*\n* @param {number} x - input value\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var out = new Uint8Array( 8 );\n* var bytes = float64ToInt64Bytes( 1.0, out, 1, 0 );\n* // returns \n*/\nfunction float64ToInt64Bytes( x, out, stride, offset ) {\n\tvar hi;\n\tvar lo;\n\tvar i;\n\n\tif ( x === 0 ) {\n\t\tfor ( i = 0; i < BYTES.length; i++ ) {\n\t\t\tout[ offset ] = 0;\n\t\t\toffset += stride;\n\t\t}\n\t\treturn out;\n\t}\n\t// Get the low 32-bit word:\n\tlo = (x&LOW_MASK)>>>0;\n\n\t// Get the high 32-bit word:\n\thi = floor( x/TWO_32 );\n\n\t// Insert the high and low words according to host byte order (endianness):\n\tif ( IS_LITTLE_ENDIAN ) {\n\t\tVIEW.setUint32( 0, lo, IS_LITTLE_ENDIAN );\n\t\tVIEW.setUint32( 4, hi, IS_LITTLE_ENDIAN );\n\t} else {\n\t\tVIEW.setUint32( 0, hi, IS_LITTLE_ENDIAN );\n\t\tVIEW.setUint32( 4, lo, IS_LITTLE_ENDIAN );\n\t}\n\tfor ( i = 0; i < BYTES.length; i++ ) {\n\t\tout[ offset ] = BYTES[ i ];\n\t\toffset += stride;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default float64ToInt64Bytes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* @module @stdlib/number-float64-base-to-int64-bytes\n*\n* @example\n* import float64ToInt64Bytes from '@stdlib/number-float64-base-to-int64-bytes';\n*\n* var bytes = float64ToInt64Bytes( 1.0 );\n* // returns \n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n* import float64ToInt64Bytes from '@stdlib/number-float64-base-to-int64-bytes';\n*\n* var out = new Uint8Array( 8 );\n* var bytes = float64ToInt64Bytes( 1.0, out, 1, 0 );\n* // returns \n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport Uint8Array from '@stdlib/array-uint8';\nimport DataView from '@stdlib/array-dataview';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\n// 0xFFFFFFFF = 2**32 - 1 => 11111111 11111111 11111111 11111111\nvar LOW_MASK = 0xFFFFFFFF >>> 0;\n\n// 2**32\nvar TWO_32 = 4294967296;\n\n\n// MAIN //\n\n/**\n* Converts an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* ## Notes\n*\n* - This function assumes that the input value is less than the maximum safe double-precision floating-point integer plus one (i.e., `2**53`).\n*\n* @param {number} x - input value\n* @returns {Uint8Array} byte array\n*\n* @example\n* var bytes = float64ToInt64Bytes( 1.0 );\n* // returns \n*/\nfunction float64ToInt64Bytes( x ) {\n\tvar bytes;\n\tvar view;\n\tvar hi;\n\tvar lo;\n\n\tbytes = new Uint8Array( 8 );\n\tif ( x === 0 ) {\n\t\treturn bytes;\n\t}\n\t// Get the low 32-bit word:\n\tlo = (x&LOW_MASK)>>>0;\n\n\t// Get the high 32-bit word:\n\thi = floor( x/TWO_32 );\n\n\t// Insert the high and low words according to host byte order (endianness):\n\tview = new DataView( bytes.buffer );\n\tif ( IS_LITTLE_ENDIAN ) {\n\t\tview.setUint32( 0, lo, IS_LITTLE_ENDIAN );\n\t\tview.setUint32( 4, hi, IS_LITTLE_ENDIAN );\n\t} else {\n\t\tview.setUint32( 0, hi, IS_LITTLE_ENDIAN );\n\t\tview.setUint32( 4, lo, IS_LITTLE_ENDIAN );\n\t}\n\treturn bytes;\n}\n\n\n// EXPORTS //\n\nexport default float64ToInt64Bytes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport DataView from '@stdlib/array-dataview';\nimport Uint8Array from '@stdlib/array-uint8';\nimport { enum as dtypes } from '@stdlib/ndarray-dtypes';\nimport { enum as orders } from '@stdlib/ndarray-orders';\nimport { enum as modes } from '@stdlib/ndarray-index-modes';\nimport { assign as float64ToInt64Bytes } from '@stdlib/number-float64-base-to-int64-bytes';\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar bytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create views for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\tbytes = new Uint8Array( v.buffer );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tfloat64ToInt64Bytes( N, bytes, 1, o );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tfloat64ToInt64Bytes( sh[i], bytes, 1, o );\n\t\tfloat64ToInt64Bytes( st[i]*nbytes, bytes, 1, o+s );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tfloat64ToInt64Bytes( this._offset*nbytes, bytes, 1, o );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tfloat64ToInt64Bytes( M, bytes, 1, o );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default meta2dataview;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport hasBigIntSupport from '@stdlib/assert-has-bigint-support';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport strides2order from '@stdlib/ndarray-base-strides2order';\nimport Boolean from '@stdlib/boolean-ctor';\nimport isColumnMajorContiguous from './is_column_major_contiguous.js';\nimport isRowMajorContiguous from './is_row_major_contiguous.js';\nimport isContiguous from './is_contiguous.js';\nimport copyFlags from './copy_flags.js';\nimport igetValue from './iget.js';\nimport isetValue from './iset.js';\nimport setValue from './set.js';\nimport getValue from './get.js';\nimport toJSON from './tojson.js';\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\nimport meta2dataview from './meta2dataview.js';\nimport meta2dataviewPolyfill from './meta2dataview.polyfill.js';\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* ## Notes\n*\n* - To create a zero-dimensional array,\n*\n* ```javascript\n* var buffer = [ 1 ];\n* var shape = [];\n* var strides = [ 0 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* ```\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order ) {\n\tvar contiguous;\n\tvar nbytes;\n\tvar ord;\n\tvar len;\n\tvar i;\n\tif ( !(this instanceof ndarray) ) {\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t}\n\t// Compute the number of elements...\n\tlen = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\t// Compute the number of bytes...\n\tif ( buffer.BYTES_PER_ELEMENT ) {\n\t\tnbytes = buffer.BYTES_PER_ELEMENT * len;\n\t} else {\n\t\tnbytes = null;\n\t}\n\t// Set private properties...\n\tthis._byteLength = nbytes;\n\tthis._bytesPerElement = bytesPerElement( dtype );\n\tthis._buffer = buffer;\n\tthis._dtype = dtype;\n\tthis._length = len;\n\tthis._ndims = shape.length;\n\tthis._offset = offset;\n\tthis._order = order;\n\tthis._shape = shape;\n\tthis._strides = strides;\n\tthis._accessors = Boolean( buffer.get && buffer.set );\n\n\tthis._iterationOrder = iterationOrder( strides );\n\n\t// Determine if the array can be stored contiguously:\n\tcontiguous = isContiguous( len, shape, strides, offset, this._iterationOrder ); // eslint-disable-line max-len\n\n\t// Infer the array \"order\" from the stride array (this is supplementary to the `order` parameter):\n\tord = strides2order( strides );\n\n\tthis._flags = {\n\t\t'ROW_MAJOR_CONTIGUOUS': isRowMajorContiguous( ord, contiguous ),\n\t\t'COLUMN_MAJOR_CONTIGUOUS': isColumnMajorContiguous( ord, contiguous ),\n\t\t'READONLY': false\n\t};\n\n\t// Initialize a property for caching serialized meta data:\n\tthis.__meta_dataview__ = null;\n\n\treturn this;\n}\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Size (in bytes) of the array (if known).\n*\n* @name byteLength\n* @memberof ndarray.prototype\n* @type {(NonNegativeInteger|null)}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var byteLength = x.byteLength;\n* // returns 48\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'byteLength', function get() {\n\treturn this._byteLength;\n});\n\n/**\n* Size (in bytes) of each array element (if known).\n*\n* @name BYTES_PER_ELEMENT\n* @memberof ndarray.prototype\n* @type {(PositiveInteger|null)}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var nbytes = x.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'BYTES_PER_ELEMENT', function get() {\n\treturn this._bytesPerElement;\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name data\n* @memberof ndarray.prototype\n* @type {(Array|TypedArray|Buffer)}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var data = x.data;\n* // returns [ 1, 2, 3, 4, 5, 6 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'data', function get() {\n\treturn this._buffer;\n});\n\n/**\n* Underlying data type.\n*\n* @name dtype\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dtype = x.dtype;\n* // returns 'generic'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'dtype', function get() {\n\treturn this._dtype;\n});\n\n/**\n* Meta information, such as information concerning the memory layout of the array.\n*\n* @name flags\n* @memberof ndarray.prototype\n* @type {Object}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var flgs = x.flags;\n* // returns \n*/\nsetReadOnlyAccessor( ndarray.prototype, 'flags', function get() {\n\treturn copyFlags( this._flags );\n});\n\n/**\n* Length of the array.\n*\n* @name length\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var len = x.length;\n* // returns 6\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Number of dimensions.\n*\n* @name ndims\n* @memberof ndarray.prototype\n* @type {PositiveInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var ndims = x.ndims;\n* // returns 2\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'ndims', function get() {\n\treturn this._ndims;\n});\n\n/**\n* Index offset which specifies the buffer index at which to start iterating over array elements.\n*\n* @name offset\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.offset;\n* // returns 0\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'offset', function get() {\n\treturn this._offset;\n});\n\n/**\n* Array order.\n*\n* ## Notes\n*\n* - The array order is either row-major (C-style) or column-major (Fortran-style).\n*\n* @name order\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var order = x.order;\n* // returns 'row-major'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'order', function get() {\n\treturn this._order;\n});\n\n/**\n* Shape of the array.\n*\n* @name shape\n* @memberof ndarray.prototype\n* @type {NonNegativeIntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.shape;\n* // returns [ 3, 2 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'shape', function get() {\n\treturn this._shape.slice();\n});\n\n/**\n* Index strides which specify how to access data along corresponding array dimensions.\n*\n* @name strides\n* @memberof ndarray.prototype\n* @type {IntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.strides;\n* // returns [ 2, 1 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'strides', function get() {\n\treturn this._strides.slice();\n});\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', getValue );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', igetValue );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', setValue );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', isetValue );\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toString\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {string} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var str = x.toString();\n* // returns \"ndarray( 'generic', [ 3, 4, 5, 6, 7, 8 ], [ 3, 2 ], [ 2, 1 ], 0, 'row-major' )\"\n*/\nsetReadOnly( ndarray.prototype, 'toString', toString );\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying an `ndarray` instance.\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toJSON\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {Object} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.toJSON();\n* // e.g., returns { 'type': 'ndarray', 'dtype': 'generic', 'flags': {...}, 'offset': 0, 'order': 'row-major', 'shape': [ 3, 2 ], 'strides': [ 2, 1 ], 'data': [ 3, 4, 5, 6, 7, 8 ] }\n*/\nsetReadOnly( ndarray.prototype, 'toJSON', toJSON );\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - Meta data format:\n*\n* ```text\n* | (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Consumers of this method should treat the returned `DataView` as **immutable**. Otherwise, mutation can invalidate meta data and potentially affect other consumers.\n*\n* @private\n* @name __array_meta_dataview__\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {DataView} serialized meta data\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dv = x.__array_meta_dataview__();\n* // returns \n*/\nsetReadOnly( ndarray.prototype, '__array_meta_dataview__', ( hasBigIntSupport() ) ? meta2dataview : meta2dataviewPolyfill );\n\n\n// EXPORTS //\n\nexport default ndarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n\n\n// MAIN //\n\n/**\n* Determines if an array is contiguous.\n*\n* @private\n* @param {NonNegativeInteger} len - array length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {integer} iterationOrder - iteration order\n* @returns {boolean} boolean indicating if an array is contiguous\n*/\nfunction isContiguous( len, shape, strides, offset, iterationOrder ) {\n\tvar buf;\n\n\t// If an array does not contain any elements, then no data to store, and, if the array is unordered, adjacent array elements are not guaranteed to be stored next to each other.\n\tif ( len === 0 || iterationOrder === 0 ) {\n\t\treturn false;\n\t}\n\t// Ensure that the array is compatible with a single memory segment:\n\tbuf = minmaxViewBufferIndex( shape, strides, offset );\n\treturn ( len === ( buf[1]-buf[0]+1 ) );\n}\n\n\n// EXPORTS //\n\nexport default isContiguous;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ndarray from '@stdlib/ndarray-base-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is ndarray-like.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating if a value is ndarray-like\n*\n* @example\n* import ndarray from '@stdlib/ndarray-ctor';\n*\n* var arr = ndarray( 'generic', [ 0, 0, 0, 0 ], [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );\n*\n* var bool = isndarrayLike( arr );\n* // returns true\n*\n* bool = isndarrayLike( [] );\n* // returns false\n*/\nfunction isndarrayLike( v ) {\n\treturn (\n\t\tv instanceof ndarray ||\n\t\t(\n\t\t\tv !== null &&\n\t\t\ttypeof v === 'object' &&\n\t\t\ttypeof v.data === 'object' &&\n\t\t\ttypeof v.shape === 'object' &&\n\t\t\ttypeof v.strides === 'object' &&\n\t\t\ttypeof v.offset === 'number' &&\n\t\t\ttypeof v.order === 'string' &&\n\t\t\ttypeof v.ndims === 'number' &&\n\t\t\ttypeof v.dtype === 'string' &&\n\t\t\ttypeof v.length === 'number' &&\n\t\t\ttypeof v.flags === 'object' &&\n\t\t\ttypeof v.get === 'function' &&\n\t\t\ttypeof v.set === 'function'\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isndarrayLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies ndarray flags.\n*\n* @private\n* @param {Object} flags - flags\n* @returns {Object} copy of input object\n*/\nfunction copyFlags( flags ) {\n\treturn {\n\t\t'ROW_MAJOR_CONTIGUOUS': flags.ROW_MAJOR_CONTIGUOUS,\n\t\t'COLUMN_MAJOR_CONTIGUOUS': flags.COLUMN_MAJOR_CONTIGUOUS,\n\t\t'READONLY': flags.READONLY\n\t};\n}\n\n\n// EXPORTS //\n\nexport default copyFlags;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} idx - indices\n* @returns {*} array element\n*/\nfunction get() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( this._offset );\n\t\t}\n\t\treturn this._buffer[ this._offset ];\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this._offset+idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset+idx ];\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this.offset-idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset-idx ];\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( ind );\n\t\t}\n\t\treturn this._buffer[ ind ];\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( ind );\n\t}\n\treturn this._buffer[ ind ];\n}\n\n\n// EXPORTS //\n\nexport default iget;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default set;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( idx, this._offset );\n\t\t} else {\n\t\t\tthis._buffer[ this._offset ] = idx;\n\t\t}\n\t\treturn this;\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset+idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset+idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset-idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset-idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( v, ind );\n\t\t} else {\n\t\t\tthis._buffer[ ind ] = v;\n\t\t}\n\t\treturn this;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( v, ind );\n\t} else {\n\t\tthis._buffer[ ind ] = v;\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default iset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport real from '@stdlib/complex-float64-real';\nimport imag from '@stdlib/complex-float64-imag';\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tlen = this._length;\n\n\t// Build an object containing all ndarray properties needed to revive a serialized ndarray...\n\tout = {};\n\tout.type = 'ndarray';\n\tout.dtype = this.dtype;\n\tout.flags = {\n\t\t'READONLY': this._flags.READONLY\n\t};\n\tout.order = this._order;\n\tout.shape = this._shape.slice();\n\tout.strides = this._strides.slice();\n\n\t// Flip the signs of negative strides:\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( out.strides[ i ] < 0 ) {\n\t\t\tout.strides[ i ] *= -1;\n\t\t}\n\t}\n\t// Cast data to generic array...\n\tout.data = [];\n\tif ( out.dtype === 'complex64' || out.dtype === 'complex128' ) {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tv = this.iget( i );\n\t\t\tout.data.push( real( v ), imag( v ) );\n\t\t}\n\t} else {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout.data.push( this.iget( i ) );\n\t\t}\n\t}\n\treturn out;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar TYPE = 'function';\n\n\n// MAIN //\n\n/**\n* Tests if an array-like object supports the accessor (get/set) protocol.\n*\n* @param {Object} value - value to test\n* @returns {boolean} boolean indicating whether a value is an accessor array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isAccessorArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isAccessorArray( [] );\n* // returns false\n*/\nfunction isAccessorArray( value ) {\n\treturn ( typeof value.get === TYPE && typeof value.set === TYPE ); // eslint-disable-line valid-typeof\n}\n\n\n// EXPORTS //\n\nexport default isAccessorArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar SETTERS = {\n\t'complex128': setComplex128,\n\t'complex64': setComplex64,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex128( arr, 1, new Complex128( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 11.0\n*/\nfunction setComplex128( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex64( arr, 1, new Complex64( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setComplex64( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* setArrayLike( arr, 2, 10 );\n*\n* var v = arr[ 2 ];\n* // returns 10\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 1, new Complex64( 10.0, 11.0 ) );\n*\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar SETTERS = {\n\t'float64': setFloat64,\n\t'float32': setFloat32,\n\t'int32': setInt32,\n\t'int16': setInt16,\n\t'int8': setInt8,\n\t'uint32': setUint32,\n\t'uint16': setUint16,\n\t'uint8': setUint8,\n\t'uint8c': setUint8c,\n\t'generic': setGeneric,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( 4 );\n*\n* setFloat64( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat64( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( 4 );\n*\n* setFloat32( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( 4 );\n*\n* setInt32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( 4 );\n*\n* setInt16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( 4 );\n*\n* setInt8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( 4 );\n*\n* setUint32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( 4 );\n*\n* setUint16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( 4 );\n*\n* setUint8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( 4 );\n*\n* setUint8c( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8c( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setGeneric( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setGeneric( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setArrayLike( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of elements in an array.\n*\n* @param {(NonNegativeIntegerArray|EmptyArray)} shape - array shape\n* @returns {NonNegativeInteger} number of elements\n*\n* @example\n* var n = numel( [ 3, 3, 3 ] );\n* // returns 27\n*/\nfunction numel( shape ) {\n\tvar ndims;\n\tvar n;\n\tvar i;\n\n\tndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0;\n\t}\n\tn = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tn *= shape[ i ];\n\t}\n\treturn n;\n}\n\n\n// EXPORTS //\n\nexport default numel;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {string} data type\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\treturn x.dtype;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies the elements of an indexed array-like object to a new \"generic\" array.\n*\n* @param {Collection} x - input array\n* @returns {Array} output array\n*\n* @example\n* var out = copy( [ 1, 2, 3 ] );\n* // returns [ 1, 2, 3 ]\n*/\nfunction copy( x ) {\n\tvar out;\n\tvar len;\n\tvar i;\n\n\tlen = x.length;\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( x[ i ] ); // use `Array#push` to ensure \"fast\" elements\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default copy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport copyIndexed from '@stdlib/array-base-copy-indexed';\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `shape` property\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x, copy ) {\n\tvar sh = x.shape;\n\tif ( copy ) {\n\t\treturn copyIndexed( sh );\n\t}\n\treturn sh;\n}\n\n\n// EXPORTS //\n\nexport default shape;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction rowmajor( shape ) {\n\tvar ndims;\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tout = [];\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tout.push( 0 );\n\t}\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction columnmajor( shape ) {\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tout = [];\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout.push( s );\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {Array} array strides\n*\n* @example\n* var s = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* s = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape );\n\t}\n\treturn rowmajor( shape );\n}\n\n\n// EXPORTS //\n\nexport default shape2strides;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Generate a stride array from an array shape.\n*\n* @module @stdlib/ndarray-base-shape2strides\n*\n* @example\n* import shape2strides from '@stdlib/ndarray-base-shape2strides';\n*\n* var strides = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* strides = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction rowmajor( shape, out ) {\n\tvar ndims;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction columnmajor( shape, out ) {\n\tvar s;\n\tvar i;\n\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*\n* @example\n* var strides = [ 0, 0 ];\n*\n* var out = shape2strides( [ 3, 2 ], 'row-major', strides );\n* // returns [ 2, 1 ]\n*\n* var bool = ( out === strides );\n* // returns true\n*\n* out = shape2strides( [ 3, 2 ], 'column-major', strides );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order, out ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape, out );\n\t}\n\treturn rowmajor( shape, out );\n}\n\n\n// EXPORTS //\n\nexport default shape2strides;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport copyIndexed from '@stdlib/array-base-copy-indexed';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `strides` property\n* @returns {IntegerArray} strides\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x, copy ) {\n\tvar ord;\n\tvar sh;\n\tvar st;\n\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\tsh = x.shape;\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( typeof ord !== 'string' ) {\n\t\t\tord = ROW_MAJOR;\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\tif ( copy ) {\n\t\treturn copyIndexed( st );\n\t}\n\treturn st;\n}\n\n\n// EXPORTS //\n\nexport default strides;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @returns {NonNegativeInteger} offset - offset\n*\n* @example\n* var shape = [ 2, 3, 10 ];\n* var strides = [ 30, -10, 1 ];\n*\n* var offset = strides2offset( shape, strides );\n* // returns 20\n*/\nfunction strides2offset( shape, strides ) {\n\tvar offset;\n\tvar ndims;\n\tvar i;\n\n\tndims = shape.length;\n\toffset = 0;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\t// Note that, since the stride is negative, this operation increments, not decrements, the offset...\n\t\t\toffset -= strides[ i ] * ( shape[ i ]-1 );\n\t\t}\n\t}\n\treturn offset;\n}\n\n\n// EXPORTS //\n\nexport default strides2offset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2offset from '@stdlib/ndarray-base-strides2offset';\n\n\n// MAIN //\n\n/**\n* Returns the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {NonNegativeInteger} index offset\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\nfunction offset( x ) {\n\tvar st;\n\tvar sh;\n\tvar o;\n\n\to = x.offset;\n\tif ( typeof o === 'number' ) {\n\t\treturn o;\n\t}\n\tsh = x.shape;\n\tif ( sh.length === 0 ) {\n\t\treturn 0;\n\t}\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn 0;\n\t}\n\treturn strides2offset( sh, st );\n}\n\n\n// EXPORTS //\n\nexport default offset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\to = x.order;\n\tif ( typeof o === 'string' ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn ROW_MAJOR; // WARNING: default to row-major for ndarray-like objects lacking strides. This may or may not be accurate, and we're defaulting to row-major here based on the belief that row-major is more likely given that, e.g., JavaScript arrays are similar to C arrays (i.e., stored in row-major order).\n\t}\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( x.shape.length === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default order;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the underlying data buffer of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {Collection} underlying data buffer\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\nfunction data( x ) {\n\treturn x.data;\n}\n\n\n// EXPORTS //\n\nexport default data;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport numel from '@stdlib/ndarray-base-numel';\nimport getDType from '@stdlib/ndarray-base-dtype';\nimport getShape from '@stdlib/ndarray-base-shape';\nimport getStrides from '@stdlib/ndarray-base-strides';\nimport getOffset from '@stdlib/ndarray-base-offset';\nimport getOrder from '@stdlib/ndarray-base-order';\nimport getData from '@stdlib/ndarray-base-data-buffer';\n\n\n// MAIN //\n\n/**\n* Converts an ndarray-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding ndarray meta data to ensure that internal functions operating on ndarrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **ref**: reference to the original ndarray-like object.\n* - **dtype**: underlying data type.\n* - **data**: data buffer.\n* - **length**: number of elements.\n* - **shape**: array dimensions.\n* - **strides**: array strides.\n* - **offset**: index offset.\n* - **order**: order.\n* - **accessorProtocol**: `boolean` indicating whether the data buffer supports the get/set protocol (i.e., uses accessors for getting and setting elements).\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an ndarray element and whose second element is an accessor for setting an ndarray element.\n*\n* @param {ndarrayLike} x - ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {Object} object containing ndarray meta data\n*\n* @example\n* import array from '@stdlib/ndarray-array';\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n*\n* var obj = ndarraylike2object( x );\n* // returns {...}\n*/\nfunction ndarraylike2object( x ) {\n\tvar xbuf;\n\tvar bool;\n\tvar sh;\n\tvar dt;\n\n\txbuf = getData( x );\n\tsh = getShape( x, true );\n\tdt = getDType( x );\n\n\tbool = isAccessorArray( xbuf );\n\n\treturn {\n\t\t'ref': x,\n\t\t'dtype': dt,\n\t\t'data': xbuf,\n\t\t'length': numel( sh ),\n\t\t'shape': sh,\n\t\t'strides': getStrides( x, true ),\n\t\t'offset': getOffset( x ),\n\t\t'order': getOrder( x ),\n\t\t'accessorProtocol': bool,\n\t\t'accessors': ( bool ) ?\n\t\t\t[ accessorGetter( dt ), accessorSetter( dt ) ] :\n\t\t\t[ getter( dt ), setter( dt ) ]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default ndarraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Normalizes an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {integer} index\n*\n* @example\n* var idx = normalizeIndex( -2, 10 );\n* // returns 9\n*\n* idx = normalizeIndex( 15, 10 );\n* // returns -1\n*\n* idx = normalizeIndex( 5, 10 );\n* // returns 5\n*/\nfunction normalizeIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\tidx += max + 1;\n\t\tif ( idx < 0 ) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\treturn -1;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default normalizeIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\n\n\n// MAIN //\n\n/**\n* Returns a list of unique indices after normalizing to the interval `[0,max]`.\n*\n* @param {IntegerArray} indices - indices\n* @param {NonNegativeInteger} max - maximum index\n* @returns {(IntegerArray|null)} normalized indices\n*\n* @example\n* var idx = toUniqueNormalizedIndices( [ -2, 5 ], 10 );\n* // returns [ 9, 5 ]\n*\n* idx = toUniqueNormalizedIndices( [ 15 ], 10 );\n* // returns null\n*/\nfunction toUniqueNormalizedIndices( indices, max ) {\n\tvar hash;\n\tvar out;\n\tvar idx;\n\tvar i;\n\n\thash = {};\n\tout = [];\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\tidx = normalizeIndex( indices[ i ], max );\n\t\tif ( idx < 0 ) {\n\t\t\treturn null;\n\t\t}\n\t\tif ( hash[ idx ] === void 0 ) {\n\t\t\thash[ idx ] = true;\n\t\t\tout.push( idx );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toUniqueNormalizedIndices;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the complement of a list of array indices.\n*\n* @param {NonNegativeInteger} N - array length\n* @param {NonNegativeIntegerArray} indices - list of indices\n* @returns {NonNegativeIntegerArray} indices complement\n*\n* @example\n* var idx = indicesComplement( 5, [ 1, 2 ] );\n* // returns [ 0, 3, 4 ]\n*/\nfunction indicesComplement( N, indices ) {\n\tvar hash;\n\tvar out;\n\tvar i;\n\n\thash = {};\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\thash[ indices[ i ] ] = true;\n\t}\n\tout = [];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( hash[ i ] === void 0 ) {\n\t\t\tout.push( i );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default indicesComplement;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Takes elements from two indexed arrays in a single pass.\n*\n* @param {Collection} x - first input array\n* @param {Collection} y - second input array\n* @param {NonNegativeIntegerArray} indices - list of indices\n* @returns {Array} output arrays\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n* var y = [ 5, 6, 7, 8 ];\n* var indices = [ 3, 1, 2, 0 ];\n*\n* var out = take2( x, y, indices );\n* // returns [ [ 4, 2, 3, 1 ], [ 8, 6, 7, 5 ] ]\n*/\nfunction take2( x, y, indices ) {\n\tvar o1;\n\tvar o2;\n\tvar i;\n\n\to1 = [];\n\to2 = [];\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\to1.push( x[ indices[ i ] ] ); // use `Array#push` to ensure \"fast\" elements\n\t\to2.push( y[ indices[ i ] ] );\n\t}\n\treturn [ o1, o2 ];\n}\n\n\n// EXPORTS //\n\nexport default take2;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128'\n};\n\n\n// EXPORTS //\n\nexport default ctor2dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64-ctor';\nimport Complex64 from '@stdlib/complex-float32-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array\n];\n\n\n// EXPORTS //\n\nexport default CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128'\n];\n\n\n// EXPORTS //\n\nexport default DTYPES;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './dtypes.js';\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport dtype from '@stdlib/array-dtype';\n\n\n// MAIN //\n\n/**\n* Converts an array-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding array meta data to ensure that internal functions operating on arrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **data**: reference to the input array.\n* - **dtype**: array data type.\n* - **accessorProtocol**: `boolean` indicating whether the input array uses accessors for getting and setting elements.\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an array element and whose second element is an accessor for setting an array element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing array meta data\n*\n* @example\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\nfunction arraylike2object( x ) {\n\tvar dt = dtype( x );\n\tif ( isAccessorArray( x ) ) {\n\t\treturn {\n\t\t\t'data': x,\n\t\t\t'dtype': dt,\n\t\t\t'accessorProtocol': true,\n\t\t\t'accessors': [\n\t\t\t\taccessorGetter( dt ),\n\t\t\t\taccessorSetter( dt )\n\t\t\t]\n\t\t};\n\t}\n\treturn {\n\t\t'data': x,\n\t\t'dtype': dt,\n\t\t'accessorProtocol': false,\n\t\t'accessors': [\n\t\t\tgetter( dt ),\n\t\t\tsetter( dt )\n\t\t]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is `undefined` or `null`.\n*\n* ## Notes\n*\n* - In older browsers, `undefined` is a global which can be overridden. `void`, however, is an operator which **cannot** be overridden. Consequently, better to use `void` to check for `undefined`. See [Stack Overflow][1].\n*\n* [1]: http://stackoverflow.com/a/19369078/2225624\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is undefined\n*\n* @example\n* var bool = isUndefinedOrNull( undefined );\n* // returns true\n*\n* bool = isUndefinedOrNull( null );\n* // returns true\n*\n* bool = isUndefinedOrNull( false );\n* // returns false\n*/\nfunction isUndefinedOrNull( value ) {\n\treturn ( value === void 0 || value === null );\n}\n\n\n// EXPORTS //\n\nexport default isUndefinedOrNull;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport isUndefinedOrNull from '@stdlib/assert-is-undefined-or-null';\n\n\n// FUNCTIONS //\n\n/**\n* Tests whether an object has a specified method.\n*\n* @private\n* @param {Object} obj - input object\n* @param {string} method - method name\n* @returns {boolean} boolean indicating whether an object has a specified method\n*\n* @example\n* var bool = hasMethod( [], 'join' );\n* // returns true\n*\n* @example\n* var bool = hasMethod( [], 'beep' );\n* // returns false\n*/\nfunction hasMethod( obj, method ) {\n\treturn ( typeof obj[ method ] === 'function' );\n}\n\n/**\n* Returns a string created by joining elements in an accessor array using a specified separator.\n*\n* @private\n* @param {Object} x - input array object\n* @param {integer} separator - separator\n* @returns {string} output string\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n*\n* var x = arraylike2object( toAccessorArray( [ 1, 2, 3, 4 ] ) );\n*\n* var out = accessors( x, ',' );\n* // returns '1,2,3,4'\n*/\nfunction accessors( x, separator ) {\n\tvar data;\n\tvar out;\n\tvar get;\n\tvar N;\n\tvar v;\n\tvar i;\n\n\tdata = x.data;\n\tget = x.accessors[ 0 ];\n\n\tN = data.length - 1;\n\tout = '';\n\tfor ( i = 0; i <= N; i++ ) {\n\t\tv = get( data, i );\n\t\tif ( !isUndefinedOrNull( v ) ) {\n\t\t\tout += String( v );\n\t\t}\n\t\tif ( i < N ) {\n\t\t\tout += separator;\n\t\t}\n\t}\n\treturn out;\n}\n\n/**\n* Returns a string created by manually joining array elements using a specified separator.\n*\n* @private\n* @param {Object} x - input array object\n* @param {integer} separator - separator\n* @returns {string} output string\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = indexed( x, ',' );\n* // returns '1,2,3,4'\n*/\nfunction indexed( x, separator ) {\n\tvar out;\n\tvar N;\n\tvar v;\n\tvar i;\n\n\tN = x.length - 1;\n\tout = '';\n\tfor ( i = 0; i <= N; i++ ) {\n\t\tv = x[ i ];\n\t\tif ( !isUndefinedOrNull( v ) ) {\n\t\t\tout += String( v );\n\t\t}\n\t\tif ( i < N ) {\n\t\t\tout += separator;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns a string created by joining array elements using a specified separator.\n*\n* @param {Collection} x - input array\n* @param {integer} separator - separator\n* @returns {string} output string\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = join( x, ',' );\n* // returns '1,2,3,4'\n*\n* @example\n* var x = [ 1, 2, 3, null, undefined, 4 ];\n*\n* var out = join( x, '-' );\n* // returns '1-2-3---4'\n*/\nfunction join( x, separator ) {\n\tvar obj;\n\tif ( hasMethod( x, 'join' ) ) {\n\t\treturn x.join( separator );\n\t}\n\tobj = arraylike2object( x );\n\tif ( obj.accessorProtocol ) {\n\t\treturn accessors( obj, separator );\n\t}\n\treturn indexed( x, separator );\n}\n\n\n// EXPORTS //\n\nexport default join;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Generates a linearly spaced numeric array whose elements increment by 1 starting from zero.\n*\n* @param {number} n - number of elements\n* @returns {Array} linearly spaced numeric array\n*\n* @example\n* var arr = zeroTo( 6 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*/\nfunction zeroTo( n ) {\n\tvar arr;\n\tvar i;\n\n\tarr = [];\n\tif ( n <= 0 ) {\n\t\treturn arr;\n\t}\n\tfor ( i = 0; i < n; i++ ) {\n\t\tarr.push( i );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default zeroTo;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\n\n\n// FUNCTIONS //\n\n/**\n* Fills an indexed array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = indexed( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = indexed( out, -1, out.length-1 );\n* // returns [ 5, 4, 3, 2, 1, 0 ]\n*/\nfunction indexed( out, stride, offset ) {\n\tvar v;\n\tvar i;\n\n\ti = offset;\n\tv = 0;\n\twhile ( i >= 0 && i < out.length ) {\n\t\tout[ i ] = v;\n\t\ti += stride;\n\t\tv += 1;\n\t}\n\treturn out;\n}\n\n/**\n* Fills a complex number array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {(Complex128Array|Complex64Array)} out - output complex number array\n* @param {(Float64Array|Float32Array)} data - output array data\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {(Complex128Array|Complex64Array)} output array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\n*\n* var out = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n* // returns \n*\n* var data = reinterpret128( out, 0 );\n* // returns [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]\n*\n* var arr = complex( out, data, 1, 0 );\n* // returns \n*\n* var bool = ( arr === out );\n* // returns true\n*\n* data = reinterpret128( out, 0 );\n* returns [ 0.0, 0.0, 1.0, 0.0, 2.0, 0.0 ]\n*/\nfunction complex( out, data, stride, offset ) {\n\tvar v;\n\tvar s;\n\tvar i;\n\n\ts = stride * 2;\n\ti = offset * 2;\n\tv = 0.0;\n\twhile ( i >= 0 && i < data.length ) {\n\t\tdata[ i ] = v; // real component\n\t\tdata[ i+1 ] = 0.0; // imaginary component\n\t\ti += s;\n\t\tv += 1.0;\n\t}\n\treturn out;\n}\n\n/**\n* Fills an accessor array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {Object} out - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n\n* var out = toAccessorArray( [ 0, 0, 0, 0, 0, 0 ] );\n* var arr = accessors( arraylike2object( out ), 1, 0 );\n*\n* var bool = ( arr === out );\n* // returns true\n*\n* var v = out.get( 0 );\n* // returns 0\n*\n* v = out.get( out.length-1 );\n* // returns 5\n*/\nfunction accessors( out, stride, offset ) {\n\tvar data;\n\tvar set;\n\tvar v;\n\tvar i;\n\n\tdata = out.data;\n\tset = out.accessors[ 1 ];\n\n\ti = offset;\n\tv = 0;\n\twhile ( i >= 0 && i < data.length ) {\n\t\tset( data, i, v );\n\t\ti += stride;\n\t\tv += 1;\n\t}\n\treturn data;\n}\n\n\n// MAIN //\n\n/**\n* Fills an array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = assign( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = assign( out, -1, out.length-1 );\n* // returns [ 5, 4, 3, 2, 1, 0 ]\n*/\nfunction assign( out, stride, offset ) {\n\tvar obj = arraylike2object( out );\n\tif ( obj.accessorProtocol ) {\n\t\t// If provided a complex number array, reinterpret as a real typed array and only set the real components...\n\t\tif ( obj.dtype === 'complex128' ) {\n\t\t\treturn complex( out, reinterpret128( out, 0 ), stride, offset );\n\t\t}\n\t\tif ( obj.dtype === 'complex64' ) {\n\t\t\treturn complex( out, reinterpret64( out, 0 ), stride, offset );\n\t\t}\n\t\treturn accessors( obj, stride, offset );\n\t}\n\treturn indexed( out, stride, offset );\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Takes elements from an indexed array.\n*\n* @param {Collection} x - input array\n* @param {NonNegativeIntegerArray} indices - list of indices\n* @returns {Array} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n* var indices = [ 3, 1, 2, 0 ];\n*\n* var y = take( x, indices );\n* // returns [ 4, 2, 3, 1 ]\n*/\nfunction take( x, indices ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\tout.push( x[ indices[ i ] ] ); // use `Array#push` to ensure \"fast\" elements\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default take;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport copy from '@stdlib/array-base-copy-indexed';\nimport take from '@stdlib/array-base-take-indexed';\nimport sort2ins from './sort2ins.js';\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: input ndarray strides sorted in loop order.\n* - **sy**: output ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - input array stride lengths\n* @param {IntegerArray} sy - output array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 6, -2, 1 ]\n*/\nfunction loopOrder( sh, sx, sy ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the input array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape and output array strides based on the sorted input array strides:\n\tsh = take( sh, idx );\n\tsy = take( sy, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'sy': sy\n\t};\n}\n\n\n// EXPORTS //\n\nexport default loopOrder;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default sort2ins;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Generate a linearly spaced numeric array whose elements increment by 1 starting from zero.\n*\n* @module @stdlib/array-base-zero-to\n*\n* @example\n* import zeroTo from '@stdlib/array-base-zero-to';\n*\n* var arr = zeroTo( 6 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* import zeroTo from '@stdlib/array-base-zero-to';\n*\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n* var arr = zeroTo.assign( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* var bool = ( out === arr );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport defaults from './defaults.js';\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - input array data type\n* @param {string} dtypeY - output array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = unaryBlockSize( 'float64', 'float64' );\n* // returns \n*/\nfunction unaryBlockSize( dtypeX, dtypeY ) {\n\tvar nbx;\n\tvar nby;\n\n\tnbx = bytesPerElement( dtypeX );\n\tnby = bytesPerElement( dtypeY );\n\tif ( nbx === null || nby === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\tif ( nbx > nby ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nby )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default unaryBlockSize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Increments index offsets according to a list of increments.\n*\n* ## Notes\n*\n* - This function mutates the list of index offsets.\n*\n* @private\n* @param {NonNegativeIntegerArray} offsets - list of index offsets\n* @param {NonNegativeIntegerArray} inc - list of increments\n* @returns {NonNegativeIntegerArray} updated offsets\n*/\nfunction incrementOffsets( offsets, inc ) {\n\tvar i;\n\tfor ( i = 0; i < offsets.length; i++ ) {\n\t\toffsets[ i ] += inc[ i ];\n\t}\n\treturn offsets;\n}\n\n\n// EXPORTS //\n\nexport default incrementOffsets;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets view offsets according to a list of index offsets.\n*\n* ## Notes\n*\n* - This function skips the second element in the list of index offsets, as that is assumed to correspond to the output ndarray which does not have a corresponding view. Meaning, the list of views is expected to have `N` elements, and the list of index offsets is expected to have `N+1` elements.\n* - This function mutates the provides view objects.\n*\n* @private\n* @param {Array} views - list of ndarray-like objects representing ndarray views\n* @param {NonNegativeIntegerArray} offsets - list of index offsets\n* @returns {Array} updated views\n*/\nfunction setViewOffsets( views, offsets ) {\n\tvar i;\n\tvar j;\n\tfor ( i = 0, j = 0; i < offsets.length; i++ ) {\n\t\tif ( i === 1 ) { // note: expected to correspond to the output ndarray which does not have a corresponding view\n\t\t\tcontinue;\n\t\t}\n\t\tviews[ j ].offset = offsets[ i ];\n\t\tj += 1;\n\t}\n\treturn views;\n}\n\n\n// EXPORTS //\n\nexport default setViewOffsets;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Resolves index offsets from a list of ndarray-like objects.\n*\n* @private\n* @param {ArrayLikeObject} arrays - list of ndarray-like objects\n* @returns {NonNegativeIntegerArray} list of offsets\n*/\nfunction offsets( arrays ) {\n\tvar out = [];\n\tvar i;\n\tfor ( i = 0; i < arrays.length; i++ ) {\n\t\tout.push( arrays[ i ].offset );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default offsets;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'boolean': 'bool',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128',\n\t'BooleanArray': 'bool'\n};\n\n\n// EXPORTS //\n\nexport default ctor2dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Boolean from '@stdlib/boolean-ctor';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {Array} output array\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tout.push( Boolean( v.value ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Boolean from '@stdlib/boolean-ctor';\nimport getter from '@stdlib/array-base-getter';\nimport floor from '@stdlib/math-base-special-floor';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Uint8Array.BYTES_PER_ELEMENT;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a `BooleanArray`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `BooleanArray`\n*/\nfunction isBooleanArray( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'BooleanArray' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a boolean typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean typed array constructor\n*/\nfunction isBooleanArrayConstructor( value ) {\n\treturn ( value === BooleanArray);\n}\n\n\n// MAIN //\n\n/**\n* Boolean array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @returns {BooleanArray} boolean array\n*\n* @example\n* var arr = new BooleanArray();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new BooleanArray( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new BooleanArray( [ true, false ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new BooleanArray( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 16\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new BooleanArray( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 8\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new BooleanArray( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction BooleanArray() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\tvar arg;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof BooleanArray) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new BooleanArray();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new BooleanArray( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new BooleanArray( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new BooleanArray( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Uint8Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\targ = arguments[ 0 ];\n\t\tif ( isNonNegativeInteger( arg ) ) {\n\t\t\tbuf = new Uint8Array( arg );\n\t\t} else if ( isCollection( arg ) ) {\n\t\t\tbuf = fromArray( new Uint8Array( arg.length ), arg );\n\t\t} else if ( isArrayBuffer( arg ) ) {\n\t\t\tbuf = new Uint8Array( arg );\n\t\t} else if ( isObject( arg ) ) {\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tif ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tbuf = arg[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tbuf = new Uint8Array( fromIterator( buf ) );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tbuf = new Uint8Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Uint8Array( buf, byteOffset, len );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof BooleanArray\n* @readonly\n* @type {PositiveInteger}\n* @default 1\n*\n* @example\n* var nbytes = BooleanArray.BYTES_PER_ELEMENT;\n* // returns 1\n*/\nsetReadOnly( BooleanArray, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof BooleanArray\n* @readonly\n* @type {string}\n* @default 'BooleanArray'\n*\n* @example\n* var str = BooleanArray.name;\n* // returns 'BooleanArray'\n*/\nsetReadOnly( BooleanArray, 'name', 'BooleanArray' );\n\n/**\n* Creates a new boolean array from an array-like object or an iterable.\n*\n* @name from\n* @memberof BooleanArray\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @returns {BooleanArray} boolean array\n*\n* @example\n* var arr = BooleanArray.from( [ true, false ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* function clbk( v ) {\n* return !v;\n* }\n*\n* var arr = BooleanArray.from( [ true, false ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( BooleanArray, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isBooleanArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tbuf[ i ] = Boolean( clbk.call( thisArg, get( src, i ), i ) );\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tlen = tmp.length;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new boolean array from a variable number of arguments.\n*\n* @name of\n* @memberof BooleanArray\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a boolean array\n* @returns {BooleanArray} boolean array\n*\n* @example\n* var arr = BooleanArray.of( true, true, true, true );\n* // returns \n*\n* var len = arr.length;\n* // returns 4\n*/\nsetReadOnly( BooleanArray, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isBooleanArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( BooleanArray.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 10\n*/\nsetReadOnlyAccessor( BooleanArray.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( BooleanArray.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 1\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 1\n*/\nsetReadOnly( BooleanArray.prototype, 'BYTES_PER_ELEMENT', BooleanArray.BYTES_PER_ELEMENT );\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {(boolean|void)} array element or undefined\n*\n* @example\n* function predicate( v ) {\n* return v === true;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var v = arr.find( predicate );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = Boolean( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn v;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* function predicate( v ) {\n* return v === true;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var v = arr.findIndex( predicate );\n* // returns 0\n*/\nsetReadOnly( BooleanArray.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = Boolean( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {(boolean|void)} array element or undefined\n*\n* @example\n* function predicate( v ) {\n* return v === true;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var v = arr.findLast( predicate );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tv = Boolean( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn v;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* function predicate( v ) {\n* return v === true;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var v = arr.findLastIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( BooleanArray.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tv = Boolean( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(boolean|void)} array element\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var v = arr.get( 0 );\n* // returns false\n*\n* arr.set( [ true, false ], 0 );\n*\n* v = arr.get( 0 );\n* // returns true\n*\n* v = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( BooleanArray.prototype, 'get', function get( idx ) {\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn Boolean( this._buffer[ idx ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof BooleanArray.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( BooleanArray.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {BooleanArray} new boolean array\n*\n* @example\n* function invert( v ) {\n* return !v;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* var out = arr.map( invert );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns false\n*\n* z = out.get( 1 );\n* // returns true\n*\n* z = out.get( 2 );\n* // returns false\n*/\nsetReadOnly( BooleanArray.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be a function. Value: `%s`.', fcn );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\toutbuf[ i ] = Boolean( fcn.call( thisArg, Boolean( buf[ i ] ), i, this ) );\n\t}\n\treturn out;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a boolean array\n* @returns {BooleanArray} reversed array\n*\n* @example\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( false, 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var v = out.get( 0 );\n* // returns false\n*\n* v = out.get( 1 );\n* // returns false\n*\n* v = out.get( 2 );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ i ];\n\t\tbuf[ i ] = buf[ j ];\n\t\tbuf[ j ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {(Collection|BooleanArray|*)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* var arr = new BooleanArray( 10 );\n*\n* var v = arr.get( 0 );\n* // returns false\n*\n* arr.set( [ true, false ], 0 );\n*\n* v = arr.get( 0 );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'set', function set( value ) {\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isCollection( value ) ) {\n\t\tN = value.length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tif ( isBooleanArray( value ) ) {\n\t\t\tsbuf = value._buffer; // eslint-disable-line no-underscore-dangle\n\t\t} else {\n\t\t\tsbuf = value;\n\t\t}\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Uint8Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tfor ( i = 0; i < N; idx++, i++ ) {\n\t\t\tbuf[ idx ] = ( sbuf[ i ] ) ? 1 : 0;\n\t\t}\n\t\treturn;\n\t}\n\tif ( idx >= this._length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t}\n\tbuf[ idx ] = ( value ) ? 1 : 0;\n});\n\n/**\n* Sorts an array in-place.\n*\n* @name sort\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @param {Function} [compareFcn] - comparison function\n* @throws {TypeError} `this` must be a boolean array\n* @throws {TypeError} first argument must be a function\n* @returns {BooleanArray} sorted array\n*\n* @example\n* function compare( a, b ) {\n* if ( a === false ) {\n* if ( b === false ) {\n* return 0;\n* }\n* return 1;\n* }\n* if ( b === true ) {\n* return 0;\n* }\n* return -1;\n* }\n*\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( true, 2 );\n*\n* arr.sort( compare );\n*\n* var v = arr.get( 0 );\n* // returns true\n*\n* v = arr.get( 1 );\n* // returns true\n*\n* v = arr.get( 2 );\n* // returns false\n*\n*/\nsetReadOnly( BooleanArray.prototype, 'sort', function sort( compareFcn ) {\n\tvar buf;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length === 0 ) {\n\t\tbuf.sort();\n\t\treturn this;\n\t}\n\tif ( !isFunction( compareFcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', compareFcn ) );\n\t}\n\tbuf.sort( compare );\n\treturn this;\n\n\t/**\n\t* Comparison function for sorting.\n\t*\n\t* @private\n\t* @param {boolean} a - first boolean value for comparison\n\t* @param {boolean} b - second boolean value for comparison\n\t* @returns {number} comparison result\n\t*/\n\tfunction compare( a, b ) {\n\t\treturn compareFcn( Boolean( a ), Boolean( b ) );\n\t}\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof BooleanArray.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a boolean array\n* @returns {BooleanArray} reversed array\n*\n* @example\n* var arr = new BooleanArray( 3 );\n*\n* arr.set( true, 0 );\n* arr.set( false, 1 );\n* arr.set( false, 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var v = out.get( 0 );\n* // returns false\n*\n* v = out.get( 1 );\n* // returns false\n*\n* v = out.get( 2 );\n* // returns true\n*/\nsetReadOnly( BooleanArray.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\n\tif ( !isBooleanArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a boolean array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\toutbuf[ i ] = buf[ len - i - 1 ];\n\t}\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default BooleanArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Boolean from '@stdlib/boolean-ctor';\n\n\n// MAIN //\n\n/**\n* Fills an output array with \"boolean\" values.\n*\n* @private\n* @param {Uint8Array} buf - output array\n* @param {Array} arr - input array\n* @returns {Uint8Array} output array\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar i;\n\n\tlen = arr.length;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tbuf[ i ] = Boolean( arr[ i ] );\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Boolean from '@stdlib/boolean-ctor';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {Array} output array\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tout.push( Boolean( clbk.call( thisArg, v.value, i ) ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\nimport BooleanArray from '@stdlib/array-bool';\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array,\n\tBooleanArray\n];\n\n\n// EXPORTS //\n\nexport default CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128',\n\t'bool'\n];\n\n\n// EXPORTS //\n\nexport default DTYPES;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './dtypes.js';\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isCollection from '@stdlib/assert-is-collection';\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport dtype from '@stdlib/array-dtype';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function to tests if an array contains a provided search value.\n*\n* @param {Collection} x - input array\n* @throws {TypeError} must provide an array-like object\n* @returns {Function} function to test if an array contains a search value\n*\n* @example\n* var contains = factory( [ 1, 2, 3 ] );\n* // returns \n*\n* var bool = contains( 2 );\n* // returns true\n*/\nfunction factory( x ) {\n\tvar get;\n\tvar len;\n\tvar dt;\n\n\tif ( !isCollection( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an array-like object. Value: `%s`.', x ) );\n\t}\n\t// Resolve the input array data type:\n\tdt = dtype( x );\n\n\t// Resolve an accessor for retrieving input array elements:\n\tif ( isAccessorArray( x ) ) {\n\t\tget = accessorGetter( dt );\n\t}\n\t// Get the number of elements over which to iterate:\n\tlen = x.length;\n\n\treturn ( get === void 0 ) ? contains : accessors;\n\t/**\n\t* Tests if an array contains a provided search value.\n\t*\n\t* @private\n\t* @param {*} value - search value\n\t* @returns {boolean} boolean indicating if an array contains a search value\n\t*\n\t* @example\n\t* var out = contains( [ 1, 2, 3 ], 2 );\n\t* // returns true\n\t*/\n\tfunction contains( value ) {\n\t\tvar i;\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( x[ i ] === value ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Tests if an array contains a provided search value.\n\t*\n\t* @private\n\t* @param {*} value - search value\n\t* @returns {boolean} boolean indicating if an array contains a search value\n\t*/\n\tfunction accessors( value ) {\n\t\tvar i;\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( get( x, i ) === value ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if an array contains a provided search value.\n*\n* @module @stdlib/array-base-assert-contains\n*\n* @example\n* import contains from '@stdlib/array-base-assert-contains';\n*\n* var out = contains( [ 1, 2, 3 ], 2 );\n* // returns true\n*/\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport factory from './factory.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default main;\n\n// exports: { \"factory\": \"main.factory\" }\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport getter from '@stdlib/array-base-getter';\nimport dtype from '@stdlib/array-dtype';\n\n\n// MAIN //\n\n/**\n* Tests if an array contains a provided search value.\n*\n* @param {Collection} x - input array\n* @param {*} value - search value\n* @returns {boolean} boolean indicating if an array contains a search value\n*\n* @example\n* var out = contains( [ 1, 2, 3 ], 2 );\n* // returns true\n*/\nfunction contains( x, value ) {\n\tvar len;\n\tvar get;\n\tvar dt;\n\tvar i;\n\n\t// Resolve the input array data type:\n\tdt = dtype( x );\n\n\t// Resolve an accessor for retrieving input array elements:\n\tif ( isAccessorArray( x ) ) {\n\t\tget = accessorGetter( dt );\n\t} else {\n\t\tget = getter( dt );\n\t}\n\t// Get the number of elements over which to iterate:\n\tlen = x.length;\n\n\t// Loop over the elements...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( get( x, i ) === value ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default contains;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport replace from '@stdlib/string-base-replace';\nimport DTYPES from './dtypes.json';\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of array data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of array data types\n*\n* @example\n* var list = dtypes();\n* // e.g., returns [ 'float32', 'float64', ... ]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport dtypes from '@stdlib/array-dtypes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported array complex-valued floating-point data type.\n*\n* @name isComplexFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported array complex-valued floating-point data type\n*\n* @example\n* var bool = isComplexFloatingPointDataType( 'complex64' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'complex128' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'float32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'float64' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isComplexFloatingPointDataType = contains( dtypes( 'complex_floating_point' ) ); // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nexport default isComplexFloatingPointDataType;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport dtypes from '@stdlib/array-dtypes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported array boolean data type.\n*\n* @name isBooleanDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported array boolean data type\n*\n* @example\n* var bool = isBooleanDataType( 'bool' );\n* // returns true\n*\n* bool = isBooleanDataType( 'complex64' );\n* // returns false\n*\n* bool = isBooleanDataType( 'complex128' );\n* // returns false\n*\n* bool = isBooleanDataType( 'float32' );\n* // returns false\n*\n* bool = isBooleanDataType( 'float64' );\n* // returns false\n*\n* bool = isBooleanDataType( 'generic' );\n* // returns false\n*\n* bool = isBooleanDataType( 'int16' );\n* // returns false\n*\n* bool = isBooleanDataType( 'int32' );\n* // returns false\n*\n* bool = isBooleanDataType( 'int8' );\n* // returns false\n*\n* bool = isBooleanDataType( 'uint16' );\n* // returns false\n*\n* bool = isBooleanDataType( 'uint32' );\n* // returns false\n*\n* bool = isBooleanDataType( 'uint8' );\n* // returns false\n*\n* bool = isBooleanDataType( 'uint8c' );\n* // returns false\n*\n* bool = isBooleanDataType( 'foo' );\n* // returns false\n*/\nvar isBooleanDataType = contains( dtypes( 'boolean' ) );\n\n\n// EXPORTS //\n\nexport default isBooleanDataType;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Reinterprets a complex-valued floating-point array as a real-valued floating-point array having the same precision.\n*\n* @param {(Complex128Array|Complex64Array)} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @throws {TypeError} first argument must be a supported complex-valued floating-point array\n* @returns {(Float64Array|Float32Array)} real-valued floating-point array view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\tif ( isComplex128Array( x ) ) {\n\t\treturn reinterpret128( x, offset );\n\t}\n\tif ( isComplex64Array( x ) ) {\n\t\treturn reinterpret64( x, offset );\n\t}\n\t// Note: intentionally throw here to catch the scenario in which we add, e.g., a Complex32Array and need to explicitly add support here...\n\tthrow new TypeError( format( 'invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.', x ) );\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Uint8Array from '@stdlib/array-uint8';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `BooleanArray` as a `Uint8Array`.\n*\n* @param {BooleanArray} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Uint8Array} `Uint8Array` view\n*\n* @example\n* import BooleanArray from '@stdlib/array-bool';\n*\n* var x = new BooleanArray( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Uint8Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), x.length-offset ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexDataType from '@stdlib/array-base-assert-is-complex-floating-point-data-type';\nimport isBooleanDataType from '@stdlib/array-base-assert-is-boolean-data-type';\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport reinterpret from '@stdlib/strided-base-reinterpret-complex';\nimport reinterpretBoolean from '@stdlib/strided-base-reinterpret-boolean';\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\nimport format from '@stdlib/string-format';\n\n\n// FUNCTIONS //\n\n/**\n* Copies every element from one array to another array, except for the element at a specified index.\n*\n* @private\n* @param {Collection} x - input array\n* @param {integer} index - element index\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = [ 0, 0, 0 ];\n* var arr = indexed( x, 0, out, 1, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* var bool = ( arr === out );\n* // returns true\n*/\nfunction indexed( x, index, out, stride, offset ) {\n\tvar io;\n\tvar i;\n\n\tio = offset;\n\tfor ( i = 0; i < x.length; i++ ) {\n\t\tif ( i === index ) {\n\t\t\tcontinue;\n\t\t}\n\t\tout[ io ] = x[ i ];\n\t\tio += stride;\n\t}\n\treturn out;\n}\n\n/**\n* Copies every element from one accessor array to another accessor array, except for the element at a specified index.\n*\n* @private\n* @param {Object} x - input array object\n* @param {integer} index - element index\n* @param {Object} out - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n*\n* var x = toAccessorArray( [ 1, 2, 3, 4 ] );\n*\n* var out = toAccessorArray( [ 0, 0, 0 ] );\n* var arr = accessors( arraylike2object( x ), 0, arraylike2object( out ), 1, 0 );\n*\n* var v = arr.get( 0 );\n* // returns 2\n*/\nfunction accessors( x, index, out, stride, offset ) {\n\tvar xdata;\n\tvar odata;\n\tvar xget;\n\tvar oset;\n\tvar io;\n\tvar i;\n\n\txdata = x.data;\n\todata = out.data;\n\n\txget = x.accessors[ 0 ];\n\toset = out.accessors[ 1 ];\n\n\tio = offset;\n\tfor ( i = 0; i < xdata.length; i++ ) {\n\t\tif ( i === index ) {\n\t\t\tcontinue;\n\t\t}\n\t\toset( odata, io, xget( xdata, i ) );\n\t\tio += stride;\n\t}\n\treturn odata;\n}\n\n/**\n* Copies every element from one complex array to another complex array, except for the element at a specified index.\n*\n* @private\n* @param {Collection} x - real-valued floating-point input array view\n* @param {integer} index - element index\n* @param {Collection} out - real-valued floating-point output array view\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array view\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import Float64Array from '@stdlib/array-float64';\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var out = new Float64Array( 2 );\n* var arr = complex( x, 0, out, 1, 0 );\n* // returns [ 3.0, 4.0 ]\n*/\nfunction complex( x, index, out, stride, offset ) {\n\tvar so;\n\tvar io;\n\tvar i;\n\tvar j;\n\n\tso = stride * 2; // multiply by 2, as real-valued array consists of interleaved real and imaginary components\n\tio = offset * 2;\n\tfor ( i = 0; i < x.length/2; i++ ) {\n\t\tif ( i === index ) {\n\t\t\tcontinue;\n\t\t}\n\t\tj = i * 2;\n\t\tout[ io ] = x[ j ];\n\t\tout[ io+1 ] = x[ j+1 ];\n\t\tio += so;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Copies every element from one array to another array, except for the element at a specified index.\n*\n* @param {Collection} x - input array\n* @param {integer} index - element index\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @throws {RangeError} second argument must not exceed array bounds\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = [ 0, 0, 0 ];\n* var arr = assign( x, 0, out, 1, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* var bool = ( arr === out );\n* // returns true\n*/\nfunction assign( x, index, out, stride, offset ) {\n\tvar xo;\n\tvar oo;\n\n\tindex = normalizeIndex( index, x.length-1 );\n\tif ( index < 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%d`.', index ) );\n\t}\n\txo = arraylike2object( x );\n\too = arraylike2object( out );\n\tif ( xo.accessorProtocol || oo.accessorProtocol ) {\n\t\t// Note: we only explicitly support a limited set of dtype-to-dtype pairs, as this function should not be concerned with casting rules, etc. That is left to userland...\n\t\tif (\n\t\t\tisComplexDataType( xo.dtype ) &&\n\t\t\tisComplexDataType( oo.dtype )\n\t\t) {\n\t\t\tcomplex( reinterpret( x, 0 ), index, reinterpret( out, 0 ), stride, offset ); // eslint-disable-line max-len\n\t\t\treturn out;\n\t\t}\n\t\tif (\n\t\t\tisBooleanDataType( xo.dtype ) &&\n\t\t\tisBooleanDataType( oo.dtype )\n\t\t) {\n\t\t\tindexed( reinterpretBoolean( x, 0 ), index, reinterpretBoolean( out, 0 ), stride, offset ); // eslint-disable-line max-len\n\t\t\treturn out;\n\t\t}\n\t\taccessors( xo, index, oo, stride, offset );\n\t\treturn out;\n\t}\n\tindexed( x, index, out, stride, offset );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\nimport zeros from '@stdlib/array-zeros';\nimport dtype from '@stdlib/array-dtype';\nimport format from '@stdlib/string-format';\nimport assign from './assign.js';\n\n\n// MAIN //\n\n/**\n* Returns a new array containing every element from an input array, except for the element at a specified index.\n*\n* @param {Collection} x - input array\n* @param {integer} index - element index\n* @throws {RangeError} second argument must not exceed array bounds\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var v = without( x, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* v = without( x, 1 );\n* // returns [ 1, 3, 4 ]\n*\n* v = without( x, -2 );\n* // returns [ 1, 2, 4 ]\n*/\nfunction without( x, index ) {\n\tvar out;\n\n\tindex = normalizeIndex( index, x.length-1 );\n\tif ( index < 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%d`.', index ) );\n\t}\n\tout = zeros( x.length-1, dtype( x ) || 'generic' );\n\tassign( x, index, out, 1, 0 );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default without;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Converts a linear index in an array view to a linear index in an underlying data buffer.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index in an array view\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {NonNegativeInteger} linear index in an underlying data buffer\n*\n* @example\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = vind2bind( shape, strides, offset, order, 1, mode );\n* // returns 7\n*/\nfunction vind2bind( shape, strides, offset, order, idx, mode ) {\n\tvar ndims;\n\tvar len;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ( mode === 'normalize' && idx < 0 ) {\n\t\t\tidx += len;\n\t\t}\n\t\tif ( idx < 0 || idx >= len ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tind = offset;\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\treturn ind;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\treturn ind;\n}\n\n\n// EXPORTS //\n\nexport default vind2bind;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a new array containing every element from an input array, except for the element at a specified index.\n*\n* @module @stdlib/array-base-without\n*\n* @example\n* import without from '@stdlib/array-base-without';\n*\n* var x = [ 1, 2, 3, 4 ];\n*\n* var v = without( x, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* v = without( x, -2 );\n* // returns [ 1, 2, 4 ]\n*\n* @example\n* import without from '@stdlib/array-base-without';\n*\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = [ 0, 0, 0 ];\n* var arr = without.assign( x, 0, out, 1, 0 );\n* // returns [ 2, 3, 4 ]\n*\n* var bool = ( arr === out );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\nimport zeros from '@stdlib/array-base-zeros';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unarynd( base, [ x, y ], views, [ 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ true, false, true ]\n*/\nfunction unarynd( fcn, arrays, views, strides, opts ) {\n\tvar ybuf;\n\tvar len;\n\tvar set;\n\tvar sh;\n\tvar iv;\n\tvar io;\n\tvar N;\n\tvar v;\n\tvar y;\n\tvar i;\n\tvar j;\n\n\tN = arrays.length;\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate based on the linear **view** index, regardless as to how the data is stored in memory...\n\tio = zeros( N );\n\tfor ( i = 0; i < len; i++ ) {\n\t\tfor ( j = 0; j < N; j++ ) {\n\t\t\tv = arrays[ j ];\n\t\t\tio[ j ] = vind2bind( sh, v.strides, iv[ j ], v.order, i, MODE );\n\t\t}\n\t\tsetViewOffsets( views, io );\n\t\tset( ybuf, io[1], fcn( views, opts ) );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unarynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\nimport zeros from '@stdlib/array-base-zeros';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unarynd( base, [ x, y ], views, [ 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ true, false, true ]\n*/\nfunction unarynd( fcn, arrays, views, strides, opts ) {\n\tvar ybuf;\n\tvar len;\n\tvar sh;\n\tvar iv;\n\tvar io;\n\tvar N;\n\tvar v;\n\tvar y;\n\tvar i;\n\tvar j;\n\n\tN = arrays.length;\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate based on the linear **view** index, regardless as to how the data is stored in memory...\n\tio = zeros( N );\n\tfor ( i = 0; i < len; i++ ) {\n\t\tfor ( j = 0; j < N; j++ ) {\n\t\t\tv = arrays[ j ];\n\t\t\tio[ j ] = vind2bind( sh, v.strides, iv[ j ], v.order, i, MODE );\n\t\t}\n\t\tsetViewOffsets( views, io );\n\t\tybuf[ io[1] ] = fcn( views, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unarynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ndarray2object from '@stdlib/ndarray-base-ndarraylike2object';\nimport normalizeIndices from '@stdlib/ndarray-base-to-unique-normalized-indices';\nimport indicesComplement from '@stdlib/array-base-indices-complement';\nimport takeIndexed2 from '@stdlib/array-base-take-indexed2';\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport strides2order from '@stdlib/ndarray-base-strides2order';\nimport numel from '@stdlib/ndarray-base-numel';\nimport join from '@stdlib/array-base-join';\nimport format from '@stdlib/string-format';\nimport initializeViews from './initialize_array_views.js';\nimport blockedaccessorunary2d from './2d_blocked_accessors.js';\nimport blockedaccessorunary3d from './3d_blocked_accessors.js';\nimport blockedaccessorunary4d from './4d_blocked_accessors.js';\nimport blockedaccessorunary5d from './5d_blocked_accessors.js';\nimport blockedaccessorunary6d from './6d_blocked_accessors.js';\nimport blockedaccessorunary7d from './7d_blocked_accessors.js';\nimport blockedaccessorunary8d from './8d_blocked_accessors.js';\nimport blockedaccessorunary9d from './9d_blocked_accessors.js';\nimport blockedaccessorunary10d from './10d_blocked_accessors.js';\nimport blockedunary2d from './2d_blocked.js';\nimport blockedunary3d from './3d_blocked.js';\nimport blockedunary4d from './4d_blocked.js';\nimport blockedunary5d from './5d_blocked.js';\nimport blockedunary6d from './6d_blocked.js';\nimport blockedunary7d from './7d_blocked.js';\nimport blockedunary8d from './8d_blocked.js';\nimport blockedunary9d from './9d_blocked.js';\nimport blockedunary10d from './10d_blocked.js';\nimport accessorunary0d from './0d_accessors.js';\nimport accessorunary1d from './1d_accessors.js';\nimport accessorunary2d from './2d_accessors.js';\nimport accessorunary3d from './3d_accessors.js';\nimport accessorunary4d from './4d_accessors.js';\nimport accessorunary5d from './5d_accessors.js';\nimport accessorunary6d from './6d_accessors.js';\nimport accessorunary7d from './7d_accessors.js';\nimport accessorunary8d from './8d_accessors.js';\nimport accessorunary9d from './9d_accessors.js';\nimport accessorunary10d from './10d_accessors.js';\nimport accessorunarynd from './nd_accessors.js';\nimport unary0d from './0d.js';\nimport unary1d from './1d.js';\nimport unary2d from './2d.js';\nimport unary3d from './3d.js';\nimport unary4d from './4d.js';\nimport unary5d from './5d.js';\nimport unary6d from './6d.js';\nimport unary7d from './7d.js';\nimport unary8d from './8d.js';\nimport unary9d from './9d.js';\nimport unary10d from './10d.js';\nimport unarynd from './nd.js';\n\n\n// VARIABLES //\n\nvar UNARY = [\n\tunary0d,\n\tunary1d,\n\tunary2d,\n\tunary3d,\n\tunary4d,\n\tunary5d,\n\tunary6d,\n\tunary7d,\n\tunary8d,\n\tunary9d,\n\tunary10d\n];\nvar ACCESSOR_UNARY = [\n\taccessorunary0d,\n\taccessorunary1d,\n\taccessorunary2d,\n\taccessorunary3d,\n\taccessorunary4d,\n\taccessorunary5d,\n\taccessorunary6d,\n\taccessorunary7d,\n\taccessorunary8d,\n\taccessorunary9d,\n\taccessorunary10d\n];\nvar BLOCKED_UNARY = [\n\tblockedunary2d, // 0\n\tblockedunary3d,\n\tblockedunary4d,\n\tblockedunary5d,\n\tblockedunary6d,\n\tblockedunary7d,\n\tblockedunary8d,\n\tblockedunary9d,\n\tblockedunary10d // 8\n];\nvar BLOCKED_ACCESSOR_UNARY = [\n\tblockedaccessorunary2d, // 0\n\tblockedaccessorunary3d,\n\tblockedaccessorunary4d,\n\tblockedaccessorunary5d,\n\tblockedaccessorunary6d,\n\tblockedaccessorunary7d,\n\tblockedaccessorunary8d,\n\tblockedaccessorunary9d,\n\tblockedaccessorunary10d // 8\n];\nvar MAX_DIMS = UNARY.length - 1;\n\n\n// MAIN //\n\n/**\n* Performs a reduction over a list of specified dimensions in an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {ArrayLikeObject} arrays - array-like object containing ndarrays\n* @param {IntegerArray} dims - list of dimensions over which to perform a reduction\n* @param {Options} [options] - function options\n* @throws {Error} arrays must have the expected number of dimensions\n* @throws {RangeError} dimension indices must not exceed input ndarray bounds\n* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions\n* @throws {Error} must provide unique dimension indices\n* @throws {Error} arrays must have the same loop dimension sizes\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import every from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unaryReduceSubarray( every, [ x, y ], [ 2, 3 ] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import every from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = [ false ];\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unaryReduceSubarray( every, [ x, y ], [ 0, 1, 2, 3 ] );\n*\n* var v = y.data;\n* // returns [ true ]\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import every from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 12 );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unaryReduceSubarray( every, [ x, y ], [] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, true ], [ true, true ] ], [ [ true, false ], [ true, true ] ], [ [ true, true ], [ true, true ] ] ]\n*/\nfunction unaryReduceSubarray( fcn, arrays, dims, options ) { // eslint-disable-line max-statements\n\tvar views;\n\tvar ndims;\n\tvar ldims;\n\tvar opts;\n\tvar arr;\n\tvar tmp;\n\tvar len;\n\tvar shx;\n\tvar shc;\n\tvar shl;\n\tvar iox;\n\tvar ioy;\n\tvar ord;\n\tvar sc;\n\tvar sl;\n\tvar sy;\n\tvar ns;\n\tvar d;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar K;\n\tvar x;\n\tvar y;\n\tvar i;\n\tvar j;\n\n\tif ( arguments.length > 3 ) {\n\t\topts = options;\n\t} else {\n\t\topts = {};\n\t}\n\t// Standardize ndarray meta data...\n\tN = arrays.length;\n\tarr = [];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tarr.push( ndarray2object( arrays[ i ] ) );\n\t}\n\t// Cache references to the input and output arrays:\n\tx = arr[ 0 ];\n\ty = arr[ 1 ];\n\n\t// Resolve the number of input array dimensions:\n\tshx = x.shape;\n\tndims = shx.length;\n\n\t// Verify that we've been provided a list of unique dimension indices...\n\tM = dims.length;\n\td = normalizeIndices( dims, ndims-1 );\n\tif ( d === null ) {\n\t\tthrow new RangeError( format( 'invalid argument. Third argument contains an out-of-bounds dimension index. Value: [%s].', join( dims, ',' ) ) );\n\t}\n\td.sort();\n\tif ( d.length !== M ) {\n\t\tthrow new Error( format( 'invalid argument. Third argument must contain a list of unique dimension indices. Value: [%s].', join( dims, ',' ) ) );\n\t}\n\t// Check whether we've been provided a valid number of dimensions to reduce...\n\tif ( M > ndims ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of specified dimensions cannot exceed the number of dimensions in the input array. Number of dimensions: %d. Value: [%s].', ndims, join( dims, ',' ) ) );\n\t}\n\t// Verify that provided ndarrays have the expected number of dimensions...\n\tK = ndims - M;\n\tfor ( i = 1; i < N; i++ ) {\n\t\tif ( arr[ i ].shape.length !== K ) {\n\t\t\tthrow new Error( format( 'invalid argument. Arrays which are not being reduced must have the same number of non-reduced dimensions. Input array shape: [%s]. Number of non-reduced dimensions: %d. Array shape: [%s] (index: %d).', join( shx, ',' ), K, join( arr[ i ].shape, ',' ), i ) );\n\t\t}\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( K === 0 ) {\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ K ]( fcn, arr, opts );\n\t\t}\n\t\treturn UNARY[ K ]( fcn, arr, opts );\n\t}\n\t// Resolve the non-reduced (\"loop\") dimensions and associated strides:\n\tldims = indicesComplement( shx.length, d );\n\ttmp = takeIndexed2( shx, x.strides, ldims );\n\tshl = tmp[ 0 ];\n\tsl = tmp[ 1 ];\n\n\t// Resolve the reduced (\"core\") dimensions and associated strides:\n\ttmp = takeIndexed2( shx, x.strides, d );\n\tshc = tmp[ 0 ];\n\tsc = tmp[ 1 ];\n\n\t// Verify that the provided arrays have the same loop dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < K; i++ ) {\n\t\ts = shl[ i ];\n\t\tfor ( j = 1; j < N; j++ ) {\n\t\t\tif ( s !== arr[ j ].shape[ i ] ) {\n\t\t\t\tthrow new Error( format( 'invalid argument. Non-reduced dimensions must be consistent across all provided arrays. Input array shape: [%s]. Non-reduced dimension indices: [%s]. Non-reduced dimensions: [%s]. Array shape: [%s] (index: %d).', join( shx, ',' ), join( ldims, ',' ), join( shl, ',' ), join( arr[ j ].shape, ',' ), j ) );\n\t\t\t}\n\t\t}\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= s;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( s === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided empty ndarrays...\n\tif ( len === 0 || ( shc.length && numel( shc ) === 0 ) ) {\n\t\treturn;\n\t}\n\t// Initialize ndarray-like objects for representing sub-array views...\n\tviews = [\n\t\t{\n\t\t\t'dtype': x.dtype,\n\t\t\t'data': x.data,\n\t\t\t'shape': shc,\n\t\t\t'strides': sc,\n\t\t\t'offset': x.offset,\n\t\t\t'order': x.order\n\t\t}\n\t];\n\tinitializeViews( arr, views );\n\n\t// Determine whether we only have one loop dimension and can thus readily perform one-dimensional iteration...\n\tif ( K === 1 ) {\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ K ]( fcn, arr, views, sl, opts );\n\t\t}\n\t\treturn UNARY[ K ]( fcn, arr, views, sl, opts );\n\t}\n\tsy = y.strides;\n\n\t// Determine whether the loop dimensions have only **one** non-singleton dimension (e.g., shape=[10,1,1,1]) so that we can treat loop iteration as being equivalent to one-dimensional iteration...\n\tif ( ns === K-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < K; i++ ) {\n\t\t\tif ( shl[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ty.shape = [ shl[i] ];\n\t\tfor ( j = 0; j < N; j++ ) {\n\t\t\tarr[ j ].strides = [ arr[j].strides[i] ];\n\t\t}\n\t\tsl = [ sl[i] ];\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ 1 ]( fcn, arr, views, sl, opts );\n\t\t}\n\t\treturn UNARY[ 1 ]( fcn, arr, views, sl, opts );\n\t}\n\tiox = iterationOrder( sl ); // +/-1\n\tioy = iterationOrder( sy ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tord = strides2order( sl );\n\tif ( iox !== 0 && ioy !== 0 && ord === strides2order( sy ) && K <= MAX_DIMS ) { // eslint-disable-line max-len\n\t\t// So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides) and the memory layouts are the same, we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ K ]( fcn, arr, views, sl, ord === 1, opts );\n\t\t}\n\t\treturn UNARY[ K ]( fcn, arr, views, sl, ord === 1, opts );\n\t}\n\t// At this point, we're either dealing with non-contiguous n-dimensional arrays, high dimensional n-dimensional arrays, and/or arrays having differing memory layouts, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( K <= MAX_DIMS ) {\n\t\tif ( y.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_UNARY[ K-2 ]( fcn, arr, views, sl, opts );\n\t\t}\n\t\treturn BLOCKED_UNARY[ K-2 ]( fcn, arr, views, sl, opts );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( y.accessorProtocol ) {\n\t\treturn accessorunarynd( fcn, arr, views, sl, opts );\n\t}\n\tunarynd( fcn, arr, views, sl, opts );\n}\n\n\n// EXPORTS //\n\nexport default unaryReduceSubarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport without from '@stdlib/array-base-without';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 1 );\n*\n* // Define the array shapes:\n* var xsh = [ 2, 2 ];\n* var ysh = [];\n*\n* // Define the array strides:\n* var sx = [ 6, 1 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unary0d( base, [ x, y ], {} );\n*\n* var v = y.data;\n* // returns [ true ]\n*/\nfunction unary0d( fcn, arrays, opts ) {\n\tarrays[1].data[ arrays[1].offset ] = fcn( without( arrays, 1 ), opts );\n}\n\n\n// EXPORTS //\n\nexport default unary0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary1d( base, [ x, y ], views, [ 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ true, false, true ]\n*/\nfunction unary1d( fcn, arrays, views, strides, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar sh;\n\tvar S0;\n\tvar iv;\n\tvar i0;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tS0 = sh[ 0 ];\n\tdv0 = [ strides[0] ];\n\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\tdv0.push( arrays[i].strides[0] );\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tsetViewOffsets( views, iv );\n\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\tincrementOffsets( iv, dv0 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary2d( base, [ x, y ], views, [ 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction unary2d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdv0 = [ strides[1] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[0] - ( S0*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[1] );\n\t\t\tdv1.push( sv[0] - ( S0*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tsetViewOffsets( views, iv );\n\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\tincrementOffsets( iv, dv0 );\n\t\t}\n\t\tincrementOffsets( iv, dv1 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary3d( base, [ x, y ], views, [ 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, false, true ] ] ]\n*/\nfunction unary3d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdv0 = [ strides[2] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[2] ) ];\n\t\tdv2 = [ strides[0] - ( S1*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[2] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[2] ) );\n\t\t\tdv2.push( sv[0] - ( S1*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv1 );\n\t\t}\n\t\tincrementOffsets( iv, dv2 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary4d( base, [ x, y ], views, [ 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ true, false, true ] ] ] ]\n*/\nfunction unary4d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdv0 = [ strides[3] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[2] - ( S0*strides[3] ) ];\n\t\tdv2 = [ strides[1] - ( S1*strides[2] ) ];\n\t\tdv3 = [ strides[0] - ( S2*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[3] );\n\t\t\tdv1.push( sv[2] - ( S0*sv[3] ) );\n\t\t\tdv2.push( sv[1] - ( S1*sv[2] ) );\n\t\t\tdv3.push( sv[0] - ( S2*sv[1]) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv2 );\n\t\t}\n\t\tincrementOffsets( iv, dv3 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary5d( base, [ x, y ], views, [ 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ true, false, true ] ] ] ] ]\n*/\nfunction unary5d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdv0 = [ strides[4] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[3] - ( S0*strides[4] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[3] ) ];\n\t\tdv3 = [ strides[1] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[0] - ( S3*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[4] );\n\t\t\tdv1.push( sv[3] - ( S0*sv[4] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[3] ) );\n\t\t\tdv3.push( sv[1] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[0] - ( S3*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv3 );\n\t\t}\n\t\tincrementOffsets( iv, dv4 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary6d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ true, false, true ] ] ] ] ] ]\n*/\nfunction unary6d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdv0 = [ strides[5] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[4] - ( S0*strides[5] ) ];\n\t\tdv2 = [ strides[3] - ( S1*strides[4] ) ];\n\t\tdv3 = [ strides[2] - ( S2*strides[3] ) ];\n\t\tdv4 = [ strides[1] - ( S3*strides[2] ) ];\n\t\tdv5 = [ strides[0] - ( S4*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[5] );\n\t\t\tdv1.push( sv[4] - ( S0*sv[5] ) );\n\t\t\tdv2.push( sv[3] - ( S1*sv[4] ) );\n\t\t\tdv3.push( sv[2] - ( S2*sv[3] ) );\n\t\t\tdv4.push( sv[1] - ( S3*sv[2] ) );\n\t\t\tdv5.push( sv[0] - ( S4*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv4 );\n\t\t}\n\t\tincrementOffsets( iv, dv5 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary7d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ]\n*/\nfunction unary7d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdv0 = [ strides[6] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[5] - ( S0*strides[6] ) ];\n\t\tdv2 = [ strides[4] - ( S1*strides[5] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[4] ) ];\n\t\tdv4 = [ strides[2] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[1] - ( S4*strides[2] ) ];\n\t\tdv6 = [ strides[0] - ( S5*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[6] );\n\t\t\tdv1.push( sv[5] - ( S0*sv[6] ) );\n\t\t\tdv2.push( sv[4] - ( S1*sv[5] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[4] ) );\n\t\t\tdv4.push( sv[2] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[1] - ( S4*sv[2] ) );\n\t\t\tdv6.push( sv[0] - ( S5*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv5 );\n\t\t}\n\t\tincrementOffsets( iv, dv6 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary8d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ]\n*/\nfunction unary8d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdv0 = [ strides[7] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[6] - ( S0*strides[7] ) ];\n\t\tdv2 = [ strides[5] - ( S1*strides[6] ) ];\n\t\tdv3 = [ strides[4] - ( S2*strides[5] ) ];\n\t\tdv4 = [ strides[3] - ( S3*strides[4] ) ];\n\t\tdv5 = [ strides[2] - ( S4*strides[3] ) ];\n\t\tdv6 = [ strides[1] - ( S5*strides[2] ) ];\n\t\tdv7 = [ strides[0] - ( S6*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[7] );\n\t\t\tdv1.push( sv[6] - ( S0*sv[7] ) );\n\t\t\tdv2.push( sv[5] - ( S1*sv[6] ) );\n\t\t\tdv3.push( sv[4] - ( S2*sv[5] ) );\n\t\t\tdv4.push( sv[3] - ( S3*sv[4] ) );\n\t\t\tdv5.push( sv[2] - ( S4*sv[3] ) );\n\t\t\tdv6.push( sv[1] - ( S5*sv[2] ) );\n\t\t\tdv7.push( sv[0] - ( S6*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv6 );\n\t\t}\n\t\tincrementOffsets( iv, dv7 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary9d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ]\n*/\nfunction unary9d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdv0 = [ strides[8] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[7] - ( S0*strides[8] ) ];\n\t\tdv2 = [ strides[6] - ( S1*strides[7] ) ];\n\t\tdv3 = [ strides[5] - ( S2*strides[6] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[5] ) ];\n\t\tdv5 = [ strides[3] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[2] - ( S5*strides[3] ) ];\n\t\tdv7 = [ strides[1] - ( S6*strides[2] ) ];\n\t\tdv8 = [ strides[0] - ( S7*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[8] );\n\t\t\tdv1.push( sv[7] - ( S0*sv[8] ) );\n\t\t\tdv2.push( sv[6] - ( S1*sv[7] ) );\n\t\t\tdv3.push( sv[5] - ( S2*sv[6] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[5] ) );\n\t\t\tdv5.push( sv[3] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[2] - ( S5*sv[3] ) );\n\t\t\tdv7.push( sv[1] - ( S6*sv[2] ) );\n\t\t\tdv8.push( sv[0] - ( S7*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ];\n\t\tdv8 = [ strides[8] - ( S7*strides[7] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t\tdv8.push( sv[8] - ( S7*sv[7] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv7 );\n\t\t}\n\t\tincrementOffsets( iv, dv8 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary10d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ] ]\n*/\nfunction unary10d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar dv9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdv0 = [ strides[9] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[8] - ( S0*strides[9] ) ];\n\t\tdv2 = [ strides[7] - ( S1*strides[8] ) ];\n\t\tdv3 = [ strides[6] - ( S2*strides[7] ) ];\n\t\tdv4 = [ strides[5] - ( S3*strides[6] ) ];\n\t\tdv5 = [ strides[4] - ( S4*strides[5] ) ];\n\t\tdv6 = [ strides[3] - ( S5*strides[4] ) ];\n\t\tdv7 = [ strides[2] - ( S6*strides[3] ) ];\n\t\tdv8 = [ strides[1] - ( S7*strides[2] ) ];\n\t\tdv9 = [ strides[0] - ( S8*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[9] );\n\t\t\tdv1.push( sv[8] - ( S0*sv[9] ) );\n\t\t\tdv2.push( sv[7] - ( S1*sv[8] ) );\n\t\t\tdv3.push( sv[6] - ( S2*sv[7] ) );\n\t\t\tdv4.push( sv[5] - ( S3*sv[6] ) );\n\t\t\tdv5.push( sv[4] - ( S4*sv[5] ) );\n\t\t\tdv6.push( sv[3] - ( S5*sv[4] ) );\n\t\t\tdv7.push( sv[2] - ( S6*sv[3] ) );\n\t\t\tdv8.push( sv[1] - ( S7*sv[2] ) );\n\t\t\tdv9.push( sv[0] - ( S8*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ];\n\t\tdv8 = [ strides[8] - ( S7*strides[7] ) ];\n\t\tdv9 = [ strides[9] - ( S8*strides[8] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t\tdv8.push( sv[8] - ( S7*sv[7] ) );\n\t\t\tdv9.push( sv[9] - ( S8*sv[8] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv8 );\n\t\t}\n\t\tincrementOffsets( iv, dv9 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport without from '@stdlib/array-base-without';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 1 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 2, 2 ];\n* var ysh = [];\n*\n* // Define the array strides:\n* var sx = [ 6, 1 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Perform a reduction:\n* unary0d( base, [ x, y ], {} );\n*\n* var v = y.data.get( 0 );\n* // returns true\n*/\nfunction unary0d( fcn, arrays, opts ) {\n\tvar y = arrays[ 1 ];\n\ty.accessors[ 1 ]( y.data, y.offset, fcn( without( arrays, 1 ), opts ) );\n}\n\n\n// EXPORTS //\n\nexport default unary0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 3, 2, 2 ];\n* var ysh = [ 3 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary1d( base, [ x, y ], views, [ 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ true, false, true ]\n*/\nfunction unary1d( fcn, arrays, views, strides, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar sh;\n\tvar S0;\n\tvar iv;\n\tvar i0;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = sh[ 0 ];\n\tdv0 = [ strides[0] ];\n\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\tdv0.push( arrays[i].strides[0] );\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tsetViewOffsets( views, iv );\n\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\tincrementOffsets( iv, dv0 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary2d( base, [ x, y ], views, [ 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction unary2d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdv0 = [ strides[1] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[0] - ( S0*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[1] );\n\t\t\tdv1.push( sv[0] - ( S0*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tsetViewOffsets( views, iv );\n\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\tincrementOffsets( iv, dv0 );\n\t\t}\n\t\tincrementOffsets( iv, dv1 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary3d( base, [ x, y ], views, [ 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, false, true ] ] ]\n*/\nfunction unary3d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdv0 = [ strides[2] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[2] ) ];\n\t\tdv2 = [ strides[0] - ( S1*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[2] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[2] ) );\n\t\t\tdv2.push( sv[0] - ( S1*sv[1] ) );\n\t\t}\n\t} else {\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv1 );\n\t\t}\n\t\tincrementOffsets( iv, dv2 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary4d( base, [ x, y ], views, [ 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ true, false, true ] ] ] ]\n*/\nfunction unary4d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdv0 = [ strides[3] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[2] - ( S0*strides[3] ) ];\n\t\tdv2 = [ strides[1] - ( S1*strides[2] ) ];\n\t\tdv3 = [ strides[0] - ( S2*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[3] );\n\t\t\tdv1.push( sv[2] - ( S0*sv[3] ) );\n\t\t\tdv2.push( sv[1] - ( S1*sv[2] ) );\n\t\t\tdv3.push( sv[0] - ( S2*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2]) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv2 );\n\t\t}\n\t\tincrementOffsets( iv, dv3 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary5d( base, [ x, y ], views, [ 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ true, false, true ] ] ] ] ]\n*/\nfunction unary5d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdv0 = [ strides[4] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[3] - ( S0*strides[4] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[3] ) ];\n\t\tdv3 = [ strides[1] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[0] - ( S3*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[4] );\n\t\t\tdv1.push( sv[3] - ( S0*sv[4] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[3] ) );\n\t\t\tdv3.push( sv[1] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[0] - ( S3*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv3 );\n\t\t}\n\t\tincrementOffsets( iv, dv4 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary6d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ true, false, true ] ] ] ] ] ]\n*/\nfunction unary6d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdv0 = [ strides[5] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[4] - ( S0*strides[5] ) ];\n\t\tdv2 = [ strides[3] - ( S1*strides[4] ) ];\n\t\tdv3 = [ strides[2] - ( S2*strides[3] ) ];\n\t\tdv4 = [ strides[1] - ( S3*strides[2] ) ];\n\t\tdv5 = [ strides[0] - ( S4*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[5] );\n\t\t\tdv1.push( sv[4] - ( S0*sv[5] ) );\n\t\t\tdv2.push( sv[3] - ( S1*sv[4] ) );\n\t\t\tdv3.push( sv[2] - ( S2*sv[3] ) );\n\t\t\tdv4.push( sv[1] - ( S3*sv[2] ) );\n\t\t\tdv5.push( sv[0] - ( S4*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv4 );\n\t\t}\n\t\tincrementOffsets( iv, dv5 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary7d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ]\n*/\nfunction unary7d( fcn, arrays, views, strides, isRowMajor, opts ) {\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdv0 = [ strides[6] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[5] - ( S0*strides[6] ) ];\n\t\tdv2 = [ strides[4] - ( S1*strides[5] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[4] ) ];\n\t\tdv4 = [ strides[2] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[1] - ( S4*strides[2] ) ];\n\t\tdv6 = [ strides[0] - ( S5*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[6] );\n\t\t\tdv1.push( sv[5] - ( S0*sv[6] ) );\n\t\t\tdv2.push( sv[4] - ( S1*sv[5] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[4] ) );\n\t\t\tdv4.push( sv[2] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[1] - ( S4*sv[2] ) );\n\t\t\tdv6.push( sv[0] - ( S5*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv5 );\n\t\t}\n\t\tincrementOffsets( iv, dv6 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary8d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ]\n*/\nfunction unary8d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdv0 = [ strides[7] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[6] - ( S0*strides[7] ) ];\n\t\tdv2 = [ strides[5] - ( S1*strides[6] ) ];\n\t\tdv3 = [ strides[4] - ( S2*strides[5] ) ];\n\t\tdv4 = [ strides[3] - ( S3*strides[4] ) ];\n\t\tdv5 = [ strides[2] - ( S4*strides[3] ) ];\n\t\tdv6 = [ strides[1] - ( S5*strides[2] ) ];\n\t\tdv7 = [ strides[0] - ( S6*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[7] );\n\t\t\tdv1.push( sv[6] - ( S0*sv[7] ) );\n\t\t\tdv2.push( sv[5] - ( S1*sv[6] ) );\n\t\t\tdv3.push( sv[4] - ( S2*sv[5] ) );\n\t\t\tdv4.push( sv[3] - ( S3*sv[4] ) );\n\t\t\tdv5.push( sv[2] - ( S4*sv[3] ) );\n\t\t\tdv6.push( sv[1] - ( S5*sv[2] ) );\n\t\t\tdv7.push( sv[0] - ( S6*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv6 );\n\t\t}\n\t\tincrementOffsets( iv, dv7 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary9d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ]\n*/\nfunction unary9d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdv0 = [ strides[8] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[7] - ( S0*strides[8] ) ];\n\t\tdv2 = [ strides[6] - ( S1*strides[7] ) ];\n\t\tdv3 = [ strides[5] - ( S2*strides[6] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[5] ) ];\n\t\tdv5 = [ strides[3] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[2] - ( S5*strides[3] ) ];\n\t\tdv7 = [ strides[1] - ( S6*strides[2] ) ];\n\t\tdv8 = [ strides[0] - ( S7*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[8] );\n\t\t\tdv1.push( sv[7] - ( S0*sv[8] ) );\n\t\t\tdv2.push( sv[6] - ( S1*sv[7] ) );\n\t\t\tdv3.push( sv[5] - ( S2*sv[6] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[5] ) );\n\t\t\tdv5.push( sv[3] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[2] - ( S5*sv[3] ) );\n\t\t\tdv7.push( sv[1] - ( S6*sv[2] ) );\n\t\t\tdv8.push( sv[0] - ( S7*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ];\n\t\tdv8 = [ strides[8] - ( S7*strides[7] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t\tdv8.push( sv[8] - ( S7*sv[7] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv7 );\n\t\t}\n\t\tincrementOffsets( iv, dv8 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {boolean} isRowMajor - boolean indicating if provided arrays are in row-major order\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* unary10d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4 ], true, {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ] ]\n*/\nfunction unary10d( fcn, arrays, views, strides, isRowMajor, opts ) { // eslint-disable-line max-statements\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar dv9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sv;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar y;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dv#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the output ndarray and associated shape:\n\ty = arrays[ 1 ];\n\tsh = y.shape;\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tif ( isRowMajor ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdv0 = [ strides[9] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[8] - ( S0*strides[9] ) ];\n\t\tdv2 = [ strides[7] - ( S1*strides[8] ) ];\n\t\tdv3 = [ strides[6] - ( S2*strides[7] ) ];\n\t\tdv4 = [ strides[5] - ( S3*strides[6] ) ];\n\t\tdv5 = [ strides[4] - ( S4*strides[5] ) ];\n\t\tdv6 = [ strides[3] - ( S5*strides[4] ) ];\n\t\tdv7 = [ strides[2] - ( S6*strides[3] ) ];\n\t\tdv8 = [ strides[1] - ( S7*strides[2] ) ];\n\t\tdv9 = [ strides[0] - ( S8*strides[1] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[9] );\n\t\t\tdv1.push( sv[8] - ( S0*sv[9] ) );\n\t\t\tdv2.push( sv[7] - ( S1*sv[8] ) );\n\t\t\tdv3.push( sv[6] - ( S2*sv[7] ) );\n\t\t\tdv4.push( sv[5] - ( S3*sv[6] ) );\n\t\t\tdv5.push( sv[4] - ( S4*sv[5] ) );\n\t\t\tdv6.push( sv[3] - ( S5*sv[4] ) );\n\t\t\tdv7.push( sv[2] - ( S6*sv[3] ) );\n\t\t\tdv8.push( sv[1] - ( S7*sv[2] ) );\n\t\t\tdv9.push( sv[0] - ( S8*sv[1] ) );\n\t\t}\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdv0 = [ strides[0] ]; // offset increment for innermost loop\n\t\tdv1 = [ strides[1] - ( S0*strides[0] ) ];\n\t\tdv2 = [ strides[2] - ( S1*strides[1] ) ];\n\t\tdv3 = [ strides[3] - ( S2*strides[2] ) ];\n\t\tdv4 = [ strides[4] - ( S3*strides[3] ) ];\n\t\tdv5 = [ strides[5] - ( S4*strides[4] ) ];\n\t\tdv6 = [ strides[6] - ( S5*strides[5] ) ];\n\t\tdv7 = [ strides[7] - ( S6*strides[6] ) ];\n\t\tdv8 = [ strides[8] - ( S7*strides[7] ) ];\n\t\tdv9 = [ strides[9] - ( S8*strides[8] ) ]; // offset increment for outermost loop\n\t\tfor ( i = 1; i < arrays.length; i++ ) {\n\t\t\tsv = arrays[ i ].strides;\n\t\t\tdv0.push( sv[0] );\n\t\t\tdv1.push( sv[1] - ( S0*sv[0] ) );\n\t\t\tdv2.push( sv[2] - ( S1*sv[1] ) );\n\t\t\tdv3.push( sv[3] - ( S2*sv[2] ) );\n\t\t\tdv4.push( sv[4] - ( S3*sv[3] ) );\n\t\t\tdv5.push( sv[5] - ( S4*sv[4] ) );\n\t\t\tdv6.push( sv[6] - ( S5*sv[5] ) );\n\t\t\tdv7.push( sv[7] - ( S6*sv[6] ) );\n\t\t\tdv8.push( sv[8] - ( S7*sv[7] ) );\n\t\t\tdv9.push( sv[9] - ( S8*sv[8] ) );\n\t\t}\n\t}\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tiv = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the non-reduced ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t}\n\t\t\tincrementOffsets( iv, dv8 );\n\t\t}\n\t\tincrementOffsets( iv, dv9 );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default unary10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary2d( base, [ x, y ], views, [ 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction blockedunary2d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar ov1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tdv1 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov1[ k ] = ov[k] + ( j1*sv[k][1] );\n\t\t}\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t}\n\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary3d( base, [ x, y ], views, [ 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, false, true ] ] ]\n*/\nfunction blockedunary3d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar ov1;\n\tvar ov2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov2[ k ] = ov[k] + ( j2*sv[k][2] );\n\t\t}\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t}\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t}\n\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary4d( base, [ x, y ], views, [ 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ true, false, true ] ] ] ]\n*/\nfunction blockedunary4d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov3[ k ] = ov[k] + ( j3*sv[k][3] );\n\t\t}\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t}\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t}\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t}\n\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary5d( base, [ x, y ], views, [ 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ true, false, true ] ] ] ] ]\n*/\nfunction blockedunary5d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov4[ k ] = ov[k] + ( j4*sv[k][4] );\n\t\t}\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t}\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t}\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary6d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ true, false, true ] ] ] ] ] ]\n*/\nfunction blockedunary6d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov5[ k ] = ov[k] + ( j5*sv[k][5] );\n\t\t}\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t}\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t}\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary7d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ]\n*/\nfunction blockedunary7d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov6[ k ] = ov[k] + ( j6*sv[k][6] );\n\t\t}\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t}\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t}\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary8d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary8d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov7[ k ] = ov[k] + ( j7*sv[k][7] );\n\t\t}\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t}\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t}\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary9d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary9d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar ov8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tov8 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tdv8 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov8[ k ] = ov[k] + ( j8*sv[k][8] );\n\t\t}\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv8 = sv[k][8] - ( s7*sv[k][7] );\n\t\t\t\tov7[ k ] = ov8[k] + ( j7*sv[k][7] );\n\t\t\t}\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t\t}\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv8 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary10d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary10d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar dv9;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar ov8;\n\tvar ov9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tov8 = zeros( N );\n\tov9 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tdv8 = zeros( N );\n\tdv9 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov9[ k ] = ov[k] + ( j9*sv[k][9] );\n\t\t}\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv9 = sv[k][9] - ( s8*sv[k][8] );\n\t\t\t\tov8[ k ] = ov9[k] + ( j8*sv[k][8] );\n\t\t\t}\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv8 = sv[k][8] - ( s7*sv[k][7] );\n\t\t\t\t\tov7[ k ] = ov8[k] + ( j7*sv[k][7] );\n\t\t\t\t}\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iv[1] ] = fcn( views, opts );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv8 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv9 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary2d( base, [ x, y ], views, [ 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction blockedunary2d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar ov1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tdv1 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov1[ k ] = ov[k] + ( j1*sv[k][1] );\n\t\t}\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t}\n\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t}\n\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary3d( base, [ x, y ], views, [ 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ true, false, true ] ] ]\n*/\nfunction blockedunary3d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar ov1;\n\tvar ov2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov2[ k ] = ov[k] + ( j2*sv[k][2] );\n\t\t}\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t}\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t}\n\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t}\n\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary4d( base, [ x, y ], views, [ 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ true, false, true ] ] ] ]\n*/\nfunction blockedunary4d( fcn, arrays, views, strides, opts ) {\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov3[ k ] = ov[k] + ( j3*sv[k][3] );\n\t\t}\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t}\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t}\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t}\n\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary5d( base, [ x, y ], views, [ 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ true, false, true ] ] ] ] ]\n*/\nfunction blockedunary5d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov4[ k ] = ov[k] + ( j4*sv[k][4] );\n\t\t}\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t}\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t}\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary6d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ true, false, true ] ] ] ] ] ]\n*/\nfunction blockedunary6d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[1];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov5[ k ] = ov[k] + ( j5*sv[k][5] );\n\t\t}\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t}\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t}\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[1], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary7d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ]\n*/\nfunction blockedunary7d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov6[ k ] = ov[k] + ( j6*sv[k][6] );\n\t\t}\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t}\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t}\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary8d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary8d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov7[ k ] = ov[k] + ( j7*sv[k][7] );\n\t\t}\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t}\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t}\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary9d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary9d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar ov8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tov8 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tdv8 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov8[ k ] = ov[k] + ( j8*sv[k][8] );\n\t\t}\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv8 = sv[k][8] - ( s7*sv[k][7] );\n\t\t\t\tov7[ k ] = ov8[k] + ( j7*sv[k][7] );\n\t\t\t}\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t\t}\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv8 );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeros from '@stdlib/array-base-zeros';\nimport incrementOffsets from './increment_offsets.js';\nimport setViewOffsets from './set_view_offsets.js';\nimport offsets from './offsets.js';\n\n\n// MAIN //\n\n/**\n* Performs a reduction over an input ndarray and assigns results to a provided output ndarray via loop blocking.\n*\n* @private\n* @param {Function} fcn - reduction function\n* @param {Array} arrays - ndarrays\n* @param {Array} views - initialized ndarray-like objects representing sub-array views\n* @param {IntegerArray} strides - loop dimension strides for the input ndarray\n* @param {Options} opts - function options\n* @returns {void}\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );\n* var ybuf = toAccessorArray( filled( false, 3 ) );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2 ];\n* var ysh = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 2, 1 ];\n* var sy = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': accessors( ybuf ).accessors\n* };\n*\n* // Initialize ndarray-like objects representing sub-array views:\n* var views = [\n* {\n* 'dtype': x.dtype,\n* 'data': x.data,\n* 'shape': [ 2, 2 ],\n* 'strides': [ 2, 1 ],\n* 'offset': x.offset,\n* 'order': x.order\n* }\n* ];\n*\n* // Perform a reduction:\n* blockedunary10d( base, [ x, y ], views, [ 12, 12, 12, 12, 12, 12, 12, 12, 12, 4 ], {} );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ [ [ [ [ [ [ [ [ true, false, true ] ] ] ] ] ] ] ] ] ]\n*/\nfunction blockedunary10d( fcn, arrays, views, strides, opts ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar ybuf;\n\tvar set;\n\tvar dv0;\n\tvar dv1;\n\tvar dv2;\n\tvar dv3;\n\tvar dv4;\n\tvar dv5;\n\tvar dv6;\n\tvar dv7;\n\tvar dv8;\n\tvar dv9;\n\tvar ov1;\n\tvar ov2;\n\tvar ov3;\n\tvar ov4;\n\tvar ov5;\n\tvar ov6;\n\tvar ov7;\n\tvar ov8;\n\tvar ov9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sv;\n\tvar ov;\n\tvar iv;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar N;\n\tvar x;\n\tvar y;\n\tvar o;\n\tvar k;\n\n\t// Note on variable naming convention: S#, dv#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\tN = arrays.length;\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( y.shape, strides, y.strides );\n\tsh = o.sh;\n\tsv = [ o.sx, o.sy ];\n\tfor ( k = 2; k < N; k++ ) {\n\t\tsv.push( takeIndexed( arrays[k].strides, o.idx ) );\n\t}\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Resolve a list of pointers to the first indexed elements in the respective ndarrays:\n\tov = offsets( arrays );\n\n\t// Cache a reference to the output ndarray buffer:\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tset = y.accessors[ 1 ];\n\n\t// Cache offset increments for the innermost loop...\n\tdv0 = [];\n\tfor ( k = 0; k < N; k++ ) {\n\t\tdv0.push( sv[k][0] );\n\t}\n\t// Initialize loop variables...\n\tov1 = zeros( N );\n\tov2 = zeros( N );\n\tov3 = zeros( N );\n\tov4 = zeros( N );\n\tov5 = zeros( N );\n\tov6 = zeros( N );\n\tov7 = zeros( N );\n\tov8 = zeros( N );\n\tov9 = zeros( N );\n\tdv1 = zeros( N );\n\tdv2 = zeros( N );\n\tdv3 = zeros( N );\n\tdv4 = zeros( N );\n\tdv5 = zeros( N );\n\tdv6 = zeros( N );\n\tdv7 = zeros( N );\n\tdv8 = zeros( N );\n\tdv9 = zeros( N );\n\tiv = zeros( N );\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\tov9[ k ] = ov[k] + ( j9*sv[k][9] );\n\t\t}\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\tdv9 = sv[k][9] - ( s8*sv[k][8] );\n\t\t\t\tov8[ k ] = ov9[k] + ( j8*sv[k][8] );\n\t\t\t}\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\tdv8 = sv[k][8] - ( s7*sv[k][7] );\n\t\t\t\t\tov7[ k ] = ov8[k] + ( j7*sv[k][7] );\n\t\t\t\t}\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\tdv7 = sv[k][7] - ( s6*sv[k][6] );\n\t\t\t\t\t\tov6[ k ] = ov7[k] + ( j6*sv[k][6] );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\tdv6 = sv[k][6] - ( s5*sv[k][5] );\n\t\t\t\t\t\t\tov5[ k ] = ov6[k] + ( j5*sv[k][5] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\tdv5 = sv[k][5] - ( s4*sv[k][4] );\n\t\t\t\t\t\t\t\tov4[ k ] = ov5[k] + ( j4*sv[k][4] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\tdv4[ k ] = sv[k][4] - ( s3*sv[k][3] );\n\t\t\t\t\t\t\t\t\tov3[ k ] = ov4[k] + ( j3*sv[k][3] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\tdv3[ k ] = sv[k][3] - ( s2*sv[k][2] );\n\t\t\t\t\t\t\t\t\t\tov2[ k ] = ov3[k] + ( j2*sv[k][2] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\tdv2[ k ] = sv[k][2] - ( s1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\t\tov1[ k ] = ov2[k] + ( j1*sv[k][1] );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets and loop offset increments for the first ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tfor ( k = 0; k < N; k++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tiv[ k ] = ov1[k] + ( j0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\t\tdv1[ k ] = sv[k][1] - ( s0*sv[k][0] );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the non-reduced ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetViewOffsets( views, iv );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iv[ 1 ], fcn( views, opts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv0 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv1 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv2 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv3 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv4 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv5 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv6 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv7 );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv8 );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tincrementOffsets( iv, dv9 );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedunary10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Initialize ndarray-like objects for representing zero-dimensional sub-array views of ancillary ndarray arguments.\n*\n* ## Notes\n*\n* - This function ignores the first two ndarray-like objects, which are assumed to be the input and output ndarray, respectively.\n* - This function mutates the provided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - list of ndarray-like objects\n* @param {Array} out - output array\n* @returns {Array} output array\n*/\nfunction initializeViews( arrays, out ) {\n\tvar v;\n\tvar i;\n\n\tfor ( i = 2; i < arrays.length; i++ ) {\n\t\tv = arrays[ i ];\n\t\tout.push({\n\t\t\t'dtype': v.dtype,\n\t\t\t'data': v.data,\n\t\t\t'shape': [],\n\t\t\t'strides': [ 0 ],\n\t\t\t'offset': v.offset,\n\t\t\t'order': v.order\n\t\t});\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default initializeViews;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Perform a reduction over a list of specified dimensions in an input ndarray and assign results to a provided output ndarray.\n*\n* @module @stdlib/ndarray-base-unary-reduce-subarray\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import every from '@stdlib/ndarray-base-every';\n* import unaryReduceSubarray from '@stdlib/ndarray-base-unary-reduce-subarray';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Perform a reduction:\n* unaryReduceSubarray( every, [ x, y ], [ 2, 3 ] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n* import unaryReduceSubarray from '@stdlib/ndarray-base-unary-reduce-subarray';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Create a function for performing a reduction over subarrays:\n* var every = unaryReduceSubarray.factory( base );\n* // returns \n*\n* // Perform a reduction:\n* every( [ x, y ], [ 2, 3 ] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport factory from './factory.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default main;\n\n// exports: { \"factory\": \"main.factory\" }\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFunction from '@stdlib/assert-is-function';\nimport format from '@stdlib/string-format';\nimport reduce from './main.js';\n\n\n// MAIN //\n\n/**\n* Returns a function for performing a reduction over a list of specified dimensions in an input ndarray and assigning results to a provided output ndarray.\n*\n* @param {Function} fcn - reduction function\n* @throws {TypeError} first argument must be a function\n* @returns {Function} function for performing a reduction\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import filled from '@stdlib/array-base-filled';\n* import ndarray2array from '@stdlib/ndarray-base-to-array';\n* import base from '@stdlib/ndarray-base-every';\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = filled( false, 3 );\n*\n* // Define the array shapes:\n* var xsh = [ 1, 3, 2, 2 ];\n* var ysh = [ 1, 3 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 2, 1 ];\n* var sy = [ 3, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Create an input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': xsh,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Create an output ndarray-like object:\n* var y = {\n* 'dtype': 'generic',\n* 'data': ybuf,\n* 'shape': ysh,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Create a function for performing a reduction over subarrays:\n* var every = factory( base );\n* // returns \n*\n* // Perform a reduction:\n* every( [ x, y ], [ 2, 3 ] );\n*\n* var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );\n* // returns [ [ true, false, true ] ]\n*/\nfunction factory( fcn ) {\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\treturn reducer;\n\n\t/**\n\t* Performs a reduction over a list of specified dimensions in an input ndarray and assigns results to a provided output ndarray.\n\t*\n\t* @private\n\t* @param {ArrayLikeObject} arrays - array-like object containing ndarrays\n\t* @param {IntegerArray} dims - list of dimensions over which to perform a reduction\n\t* @param {Options} [options] - function options\n\t* @returns {void}\n\t*/\n\tfunction reducer( arrays, dims, options ) {\n\t\tvar opts;\n\t\tif ( arguments.length > 2 ) {\n\t\t\topts = options;\n\t\t} else {\n\t\t\topts = {};\n\t\t}\n\t\treturn reduce( fcn, arrays, dims, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar C64_BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\nvar C128_BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplexTypedArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplexTypedArray( [] );\n* // returns false\n*/\nfunction isComplexTypedArray( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex-typed-array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t(\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\t\t\tvalue.BYTES_PER_ELEMENT === C128_BYTES_PER_ELEMENT\n\t\t\t) ||\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\t\t\tvalue.BYTES_PER_ELEMENT === C64_BYTES_PER_ELEMENT\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexTypedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 1; // 1 bytes per uint8\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `BooleanArray`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `BooleanArray`\n*\n* @example\n* import BooleanArray from '@stdlib/array-bool';\n*\n* var bool = isBooleanArray( new BooleanArray( 10 ) );\n* // returns true\n*\n* bool = isBooleanArray( [] );\n* // returns false\n*/\nfunction isBooleanArray( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `BooleanArray` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-booleanarray`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'BooleanArray' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBooleanArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {PositiveInteger} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\nfunction gscal( N, alpha, x, stride ) {\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0|| alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i += 1 ) {\n\t\t\t\tx[ i ] *= alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tx[ i ] *= alpha;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nexport default gscal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport copy from '@stdlib/array-base-copy-indexed';\nimport take from '@stdlib/array-base-take-indexed';\nimport sort2ins from './sort2ins.js';\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: ndarray strides sorted in loop order.\n* - **idx**: dimension indices sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n*\n* var o = loopOrder( sh, sx );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var idx = o.idx;\n* // returns [ 2, 1, 0 ]\n*/\nfunction loopOrder( sh, sx ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape based on the sorted array strides:\n\tsh = take( sh, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'idx': idx\n\t};\n}\n\n\n// EXPORTS //\n\nexport default loopOrder;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default sort2ins;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to multiply `x` by a constant.\n*\n* @module @stdlib/blas-base-gscal\n*\n* @example\n* import gscal from '@stdlib/blas-base-gscal';\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*\n* @example\n* import gscal from '@stdlib/blas-base-gscal';\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport ndarray from './ndarray.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];\n*\n* gscal( 3, 5.0, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]\n*/\nfunction gscal( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] *= alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] *= alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nexport default gscal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport defaults from './defaults.js';\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = nullaryBlockSize( 'float64' );\n* // returns \n*/\nfunction nullaryBlockSize( dtypeX ) {\n\tvar nbx = bytesPerElement( dtypeX );\n\tif ( nbx === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default nullaryBlockSize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthynd( x );\n* // returns 4\n*/\nfunction countTruthynd( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar get;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tif ( get( xbuf, ix ) ) {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthynd( x );\n* // returns 4\n*/\nfunction countTruthynd( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthynd( x );\n* // returns 4\n*/\nfunction countTruthynd( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tif ( xbuf[ ix ] ) {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthynd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexArray from '@stdlib/array-base-assert-is-complex-typed-array';\nimport isBooleanArray from '@stdlib/array-base-assert-is-booleanarray';\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\nimport ndarray2object from '@stdlib/ndarray-base-ndarraylike2object';\nimport reinterpretComplex from '@stdlib/strided-base-reinterpret-complex';\nimport reinterpretBoolean from '@stdlib/strided-base-reinterpret-boolean';\nimport gscal from '@stdlib/blas-base-gscal';\nimport blockedaccessorcount2d from './2d_blocked_accessors.js';\nimport blockedaccessorcount3d from './3d_blocked_accessors.js';\nimport blockedaccessorcount4d from './4d_blocked_accessors.js';\nimport blockedaccessorcount5d from './5d_blocked_accessors.js';\nimport blockedaccessorcount6d from './6d_blocked_accessors.js';\nimport blockedaccessorcount7d from './7d_blocked_accessors.js';\nimport blockedaccessorcount8d from './8d_blocked_accessors.js';\nimport blockedaccessorcount9d from './9d_blocked_accessors.js';\nimport blockedaccessorcount10d from './10d_blocked_accessors.js';\nimport blockedcomplexcount2d from './2d_blocked_complex.js';\nimport blockedcomplexcount3d from './3d_blocked_complex.js';\nimport blockedcomplexcount4d from './4d_blocked_complex.js';\nimport blockedcomplexcount5d from './5d_blocked_complex.js';\nimport blockedcomplexcount6d from './6d_blocked_complex.js';\nimport blockedcomplexcount7d from './7d_blocked_complex.js';\nimport blockedcomplexcount8d from './8d_blocked_complex.js';\nimport blockedcomplexcount9d from './9d_blocked_complex.js';\nimport blockedcomplexcount10d from './10d_blocked_complex.js';\nimport blockedcount2d from './2d_blocked.js';\nimport blockedcount3d from './3d_blocked.js';\nimport blockedcount4d from './4d_blocked.js';\nimport blockedcount5d from './5d_blocked.js';\nimport blockedcount6d from './6d_blocked.js';\nimport blockedcount7d from './7d_blocked.js';\nimport blockedcount8d from './8d_blocked.js';\nimport blockedcount9d from './9d_blocked.js';\nimport blockedcount10d from './10d_blocked.js';\nimport accessorcount0d from './0d_accessors.js';\nimport accessorcount1d from './1d_accessors.js';\nimport accessorcount2d from './2d_accessors.js';\nimport accessorcount3d from './3d_accessors.js';\nimport accessorcount4d from './4d_accessors.js';\nimport accessorcount5d from './5d_accessors.js';\nimport accessorcount6d from './6d_accessors.js';\nimport accessorcount7d from './7d_accessors.js';\nimport accessorcount8d from './8d_accessors.js';\nimport accessorcount9d from './9d_accessors.js';\nimport accessorcount10d from './10d_accessors.js';\nimport accessorcountnd from './nd_accessors.js';\nimport complexcount0d from './0d_complex.js';\nimport complexcount1d from './1d_complex.js';\nimport complexcount2d from './2d_complex.js';\nimport complexcount3d from './3d_complex.js';\nimport complexcount4d from './4d_complex.js';\nimport complexcount5d from './5d_complex.js';\nimport complexcount6d from './6d_complex.js';\nimport complexcount7d from './7d_complex.js';\nimport complexcount8d from './8d_complex.js';\nimport complexcount9d from './9d_complex.js';\nimport complexcount10d from './10d_complex.js';\nimport complexcountnd from './nd_complex.js';\nimport count0d from './0d.js';\nimport count1d from './1d.js';\nimport count2d from './2d.js';\nimport count3d from './3d.js';\nimport count4d from './4d.js';\nimport count5d from './5d.js';\nimport count6d from './6d.js';\nimport count7d from './7d.js';\nimport count8d from './8d.js';\nimport count9d from './9d.js';\nimport count10d from './10d.js';\nimport countnd from './nd.js';\n\n\n// VARIABLES //\n\nvar COUNT = [\n\tcount0d,\n\tcount1d,\n\tcount2d,\n\tcount3d,\n\tcount4d,\n\tcount5d,\n\tcount6d,\n\tcount7d,\n\tcount8d,\n\tcount9d,\n\tcount10d\n];\nvar ACCESSOR_COUNT = [\n\taccessorcount0d,\n\taccessorcount1d,\n\taccessorcount2d,\n\taccessorcount3d,\n\taccessorcount4d,\n\taccessorcount5d,\n\taccessorcount6d,\n\taccessorcount7d,\n\taccessorcount8d,\n\taccessorcount9d,\n\taccessorcount10d\n];\nvar COMPLEX_COUNT = [\n\tcomplexcount0d,\n\tcomplexcount1d,\n\tcomplexcount2d,\n\tcomplexcount3d,\n\tcomplexcount4d,\n\tcomplexcount5d,\n\tcomplexcount6d,\n\tcomplexcount7d,\n\tcomplexcount8d,\n\tcomplexcount9d,\n\tcomplexcount10d\n];\nvar BLOCKED_COUNT = [\n\tblockedcount2d, // 0\n\tblockedcount3d,\n\tblockedcount4d,\n\tblockedcount5d,\n\tblockedcount6d,\n\tblockedcount7d,\n\tblockedcount8d,\n\tblockedcount9d,\n\tblockedcount10d // 8\n];\nvar BLOCKED_ACCESSOR_COUNT = [\n\tblockedaccessorcount2d, // 0\n\tblockedaccessorcount3d,\n\tblockedaccessorcount4d,\n\tblockedaccessorcount5d,\n\tblockedaccessorcount6d,\n\tblockedaccessorcount7d,\n\tblockedaccessorcount8d,\n\tblockedaccessorcount9d,\n\tblockedaccessorcount10d // 8\n];\nvar BLOCKED_COMPLEX_COUNT = [\n\tblockedcomplexcount2d, // 0\n\tblockedcomplexcount3d,\n\tblockedcomplexcount4d,\n\tblockedcomplexcount5d,\n\tblockedcomplexcount6d,\n\tblockedcomplexcount7d,\n\tblockedcomplexcount8d,\n\tblockedcomplexcount9d,\n\tblockedcomplexcount10d // 8\n];\nvar MAX_DIMS = COUNT.length - 1;\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* ## Notes\n*\n* - A provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy( [ x ] );\n* // returns 6\n*/\nfunction countTruthy( arrays ) {\n\tvar isCmplx;\n\tvar ndims;\n\tvar xmmv;\n\tvar shx;\n\tvar iox;\n\tvar len;\n\tvar sx;\n\tvar ox;\n\tvar ns;\n\tvar x;\n\tvar d;\n\tvar i;\n\n\t// Unpack the ndarray and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\tshx = x.shape;\n\tndims = shx.length;\n\n\t// Check for known array types which can be reinterpreted for better iteration performance...\n\tif ( isBooleanArray( x.data ) ) {\n\t\tx.data = reinterpretBoolean( x.data, 0 );\n\t\tx.accessorProtocol = false;\n\t} else if ( isComplexArray( x.data ) ) {\n\t\tx.data = reinterpretComplex( x.data, 0 );\n\t\tx.accessorProtocol = false;\n\t\tx.strides = gscal( ndims, 2, x.strides, 1 );\n\t\tx.offset *= 2;\n\t\tisCmplx = true;\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_COUNT[ ndims ]( x );\n\t\t}\n\t\tif ( isCmplx ) {\n\t\t\treturn COMPLEX_COUNT[ ndims ]( x );\n\t\t}\n\t\treturn COUNT[ ndims ]( x );\n\t}\n\t// Compute the number of elements and the number of singleton dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( d === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided an empty ndarray...\n\tif ( len === 0 ) {\n\t\treturn true;\n\t}\n\t// Determine whether the ndarray is one-dimensional and thus readily translates to a one-dimensional strided array...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_COUNT[ ndims ]( x );\n\t\t}\n\t\tif ( isCmplx ) {\n\t\t\treturn COMPLEX_COUNT[ ndims ]( x );\n\t\t}\n\t\treturn COUNT[ ndims ]( x );\n\t}\n\tsx = x.strides;\n\n\t// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can treat an ndarray as being equivalent to a one-dimensional strided array...\n\tif ( ns === ndims-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( shx[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tx.shape = [ shx[i] ];\n\t\tx.strides = [ sx[i] ];\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_COUNT[ 1 ]( x );\n\t\t}\n\t\tif ( isCmplx ) {\n\t\t\treturn COMPLEX_COUNT[ 1 ]( x );\n\t\t}\n\t\treturn COUNT[ 1 ]( x );\n\t}\n\tiox = iterationOrder( sx ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 ) {\n\t\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\t\txmmv = minmaxViewBufferIndex( shx, sx, x.offset );\n\n\t\t// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...\n\t\tif ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+1 ) ) ) { // eslint-disable-line max-len\n\t\t\t// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...\n\t\t\tif ( iox === 1 ) {\n\t\t\t\tox = xmmv[ 0 ];\n\t\t\t} else {\n\t\t\t\tox = xmmv[ 1 ];\n\t\t\t}\n\t\t\tx.shape = [ len ];\n\t\t\tx.strides = [ ( isCmplx ) ? iox*2 : iox ];\n\t\t\tx.offset = ox;\n\t\t\tif ( x.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_COUNT[ 1 ]( x );\n\t\t\t}\n\t\t\tif ( isCmplx ) {\n\t\t\t\treturn COMPLEX_COUNT[ 1 ]( x );\n\t\t\t}\n\t\t\treturn COUNT[ 1 ]( x );\n\t\t}\n\t\t// The ndarray is non-contiguous, so we cannot directly use one-dimensional array functionality...\n\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_COUNT[ ndims ]( x );\n\t\t\t}\n\t\t\tif ( isCmplx ) {\n\t\t\t\treturn COMPLEX_COUNT[ ndims ]( x );\n\t\t\t}\n\t\t\treturn COUNT[ ndims ]( x );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// At this point, we're either dealing with a non-contiguous n-dimensional array or a high dimensional n-dimensional array, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_COUNT[ ndims-2 ]( x );\n\t\t}\n\t\tif ( isCmplx ) {\n\t\t\treturn BLOCKED_COMPLEX_COUNT[ ndims-2 ]( x );\n\t\t}\n\t\treturn BLOCKED_COUNT[ ndims-2 ]( x );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol ) {\n\t\treturn accessorcountnd( x );\n\t}\n\tif ( isCmplx ) {\n\t\treturn complexcountnd( x );\n\t}\n\treturn countnd( x );\n}\n\n\n// EXPORTS //\n\nexport default countTruthy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy0d( x );\n* // returns 1\n*/\nfunction countTruthy0d( x ) {\n\tif ( x.data[ x.offset ] ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy1d( x );\n* // returns 4\n*/\nfunction countTruthy1d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments:\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tif ( xbuf[ ix ] ) {\n\t\t\tcount += 1;\n\t\t}\n\t\tix += dx0;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy2d( x );\n* // returns 4\n*/\nfunction countTruthy2d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy3d( x );\n* // returns 6\n*/\nfunction countTruthy3d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\tcount += 1;\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy4d( x );\n* // returns 6\n*/\nfunction countTruthy4d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy5d( x );\n* // returns 6\n*/\nfunction countTruthy5d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy6d( x );\n* // returns 6\n*/\nfunction countTruthy6d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy7d( x );\n* // returns 6\n*/\nfunction countTruthy7d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy8d( x );\n* // returns 6\n*/\nfunction countTruthy8d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy9d( x );\n* // returns 6\n*/\nfunction countTruthy9d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy10d( x );\n* // returns 6\n*/\nfunction countTruthy10d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy0d( x );\n* // returns 1\n*/\nfunction countTruthy0d( x ) {\n\tif ( x.accessors[ 0 ]( x.data, x.offset ) ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy1d( x );\n* // returns 4\n*/\nfunction countTruthy1d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tif ( get( xbuf, ix ) ) {\n\t\t\tcount += 1;\n\t\t}\n\t\tix += dx0;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy2d( x );\n* // returns 4\n*/\nfunction countTruthy2d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy3d( x );\n* // returns 4\n*/\nfunction countTruthy3d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\tcount += 1;\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy4d( x );\n* // returns 4\n*/\nfunction countTruthy4d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy5d( x );\n* // returns 4\n*/\nfunction countTruthy5d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy6d( x );\n* // returns 4\n*/\nfunction countTruthy6d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy7d( x );\n* // returns 4\n*/\nfunction countTruthy7d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy8d( x );\n* // returns 4\n*/\nfunction countTruthy8d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy9d( x );\n* // returns 4\n*/\nfunction countTruthy9d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = countTruthy10d( x );\n* // returns 4\n*/\nfunction countTruthy10d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tget = x.accessors[ 0 ];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy0d( x );\n* // returns 1\n*/\nfunction countTruthy0d( x ) {\n\tif ( x.data[ x.offset ] || x.data[ x.offset+1 ] ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy1d( x );\n* // returns 4\n*/\nfunction countTruthy1d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments:\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\tcount += 1;\n\t\t}\n\t\tix += dx0;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy2d( x );\n* // returns 4\n*/\nfunction countTruthy2d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy3d( x );\n* // returns 4\n*/\nfunction countTruthy3d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\tcount += 1;\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy4d( x );\n* // returns 4\n*/\nfunction countTruthy4d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy5d( x );\n* // returns 4\n*/\nfunction countTruthy5d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy6d( x );\n* // returns 4\n*/\nfunction countTruthy6d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy7d( x );\n* // returns 4\n*/\nfunction countTruthy7d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy8d( x );\n* // returns 4\n*/\nfunction countTruthy8d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy9d( x );\n* // returns 4\n*/\nfunction countTruthy9d( x ) {\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = countTruthy10d( x );\n* // returns 4\n*/\nfunction countTruthy10d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( strides2order( sx ) === 1 ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy2d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy2d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy3d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy3d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy4d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy4d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy5d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy5d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy6d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy6d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy7d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy7d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy8d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy8d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy9d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy9d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 =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n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy10d( x );\n* // returns 6\n*/\nfunction blockedCountTruthy10d( x ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++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t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy2d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy2d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy3d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy3d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy4d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy4d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy5d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy5d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy6d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy6d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy7d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy7d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy8d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy8d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy9d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy9d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in an ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import accessors from '@stdlib/array-base-accessors';\n*\n* // Create a data buffer:\n* var xbuf = toAccessorArray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'generic',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': accessors( xbuf ).accessors\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy10d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy10d( x ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tget = x.accessors[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( get( xbuf, ix ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy2d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy2d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy3d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy3d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy4d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy4d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy5d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy5d( x ) {\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy6d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy6d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy7d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy7d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy8d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy8d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( xbuf[ ix ] || xbuf[ ix+1 ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy9d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy9d( x ) { // eslint-disable-line max-statements\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4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t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-nullary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-nullary-tiling-block-size';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements in a reinterpreted complex number ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {NonNegativeInteger} result\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 8, 8, 8, 8, 8, 8, 8, 8, 4, 2 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Create the input ndarray-like object:\n* var x = {\n* 'dtype': 'complex128',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Perform operation:\n* var out = blockedCountTruthy10d( x );\n* // returns 4\n*/\nfunction blockedCountTruthy10d( x ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar count;\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the input ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Initialize a counter:\n\tcount = 0;\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first input ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t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\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\n\n// EXPORTS //\n\nexport default blockedCountTruthy10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFunction from '@stdlib/assert-is-function';\n\n\n// MAIN //\n\nvar bool = isFunction( Object.assign ); // eslint-disable-line node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies own enumerable properties from source objects to a target object.\n*\n* ## Notes\n*\n* - If a property key is present in multiple sources, the property from the last source that defines the key prevails.\n* - The target object is mutated.\n*\n* @name assign\n* @type {Function}\n* @param {Object} target - target object\n* @param {...Object} source - source object(s)\n* @throws {TypeError} first argument must not be null or undefined\n* @returns {Object} target object\n*\n* @example\n* var obj1 = {\n* 'a': 'beep'\n* };\n* var obj2 = {\n* 'b': 'boop'\n* };\n*\n* var out = assign( obj1, obj2 );\n* // returns { 'a': 'beep', 'b': 'boop' }\n*/\nvar assign = Object.assign; // eslint-disable-line node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof Object.getOwnPropertySymbols !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object.\n*\n* @name Object\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {Object} object\n*\n* @example\n* var o = new Object( null );\n* // returns {}\n*\n* @example\n* var o = new Object( 5.0 );\n* // returns \n*\n* @example\n* var o = new Object( 'beep' );\n* // returns \n*\n* @example\n* var o1 = {};\n*\n* var o2 = new Object( o1 );\n* // returns {}\n*\n* var bool = ( o1 === o2 );\n* // returns true\n*/\nvar Obj = Object; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Object from '@stdlib/object-ctor';\n\n\n// VARIABLES //\n\nvar propertySymbols = Object.getOwnPropertySymbols;\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own symbol properties.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.getOwnPropertySymbols()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own symbol properties\n*\n* @example\n* var symbols = getOwnPropertySymbols( {} );\n*/\nfunction getOwnPropertySymbols( value ) {\n\treturn propertySymbols( Object( value ) );\n}\n\n\n// EXPORTS //\n\nexport default getOwnPropertySymbols;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an array of an object's own symbol properties.\n*\n* @module @stdlib/utils-property-symbols\n*\n* @example\n* import getOwnPropertySymbols from '@stdlib/utils-property-symbols';\n*\n* var symbols = getOwnPropertySymbols( {} );\n*/\n\n// MODULES //\n\nimport HAS_BUILTIN from './has_builtin.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( HAS_BUILTIN ) {\n\tmain = builtin;\n} else {\n\tmain = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Copy enumerable own properties from one or more source objects to a target object.\n*\n* @module @stdlib/object-assign\n*\n* @example\n* import assign from '@stdlib/object-assign';\n*\n* var out = assign( {}, { 'foo': 'bar' }, { 'baz': 'beep' } );\n* // returns { 'foo': 'bar', 'baz': 'beep' }\n*/\n\n// MODULES //\n\nimport hasObjectAssign from './has_object_assign.js';\nimport main from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar assign;\nif ( hasObjectAssign ) {\n\tassign = main;\n} else {\n\tassign = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array of an object's own symbol properties.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.getOwnPropertySymbols()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {EmptyArray} a list of own symbol properties\n*\n* @example\n* var symbols = getOwnPropertySymbols( {} );\n* // returns []\n*/\nfunction getOwnPropertySymbols() {\n\treturn [];\n}\n\n\n// EXPORTS //\n\nexport default getOwnPropertySymbols;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport keys from '@stdlib/utils-keys';\nimport propertySymbols from '@stdlib/utils-property-symbols';\nimport isEnumerable from '@stdlib/assert-is-enumerable-property';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names and symbols.\n*\n* @param {*} value - input object\n* @returns {Array} a list of own property enumerable names and symbols\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var props = enumerableProperties( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction enumerableProperties( value ) {\n\tvar out;\n\tvar tmp;\n\tvar i;\n\n\tout = keys( value );\n\ttmp = propertySymbols( value );\n\tfor ( i = 0; i < tmp.length; i++ ) {\n\t\tif ( isEnumerable( value, tmp[ i ] ) ) {\n\t\t\tout.push( tmp[ i ] );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default enumerableProperties;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport enumerableProperties from '@stdlib/utils-enumerable-properties';\nimport Object from '@stdlib/object-ctor';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Copies own enumerable properties from source objects to a target object.\n*\n* ## Notes\n*\n* - If a property key is present in multiple sources, the property from the last source that defines the key prevails.\n* - The target object is mutated.\n*\n* @param {Object} target - target object\n* @param {...Object} source - source object(s)\n* @throws {TypeError} first argument must not be null or undefined\n* @returns {Object} target object\n*\n* @example\n* var obj1 = {\n* 'a': 'beep'\n* };\n* var obj2 = {\n* 'b': 'boop'\n* };\n*\n* var out = assign( obj1, obj2 );\n* // returns { 'a': 'beep', 'b': 'boop' }\n*/\nfunction assign( target ) {\n\tvar source;\n\tvar keys;\n\tvar key;\n\tvar len;\n\tvar to;\n\tvar i;\n\tvar j;\n\tif ( target === void 0 || target === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a non-null object. Value: `%s`.', target ) );\n\t}\n\tto = Object( target );\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\tsource = arguments[ i ];\n\t\tif ( source === void 0 || source === null ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tkeys = enumerableProperties( Object( source ) );\n\t\tlen = keys.length;\n\t\tfor ( j = 0; j < len; j++ ) {\n\t\t\tkey = keys[ j ];\n\t\t\tto[ key ] = source[ key ];\n\t\t}\n\t}\n\treturn to;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport flags from '@stdlib/ndarray-base-flags';\n\n\n// MAIN //\n\n/**\n* Returns a specified flag for a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {(string|symbol)} name - flag name\n* @returns {*} flag value\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = flag( zeros( [ 3, 3, 3 ] ), 'READONLY' );\n* // returns \n*/\nfunction flag( x, name ) {\n\treturn flags( x, false )[ name ];\n}\n\n\n// EXPORTS //\n\nexport default flag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport assign from '@stdlib/object-assign';\n\n\n// MAIN //\n\n/**\n* Returns the flags of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `flags` property\n* @returns {Object} flags\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = flags( zeros( [ 3, 3, 3 ] ), false );\n* // returns {...}\n*/\nfunction flags( x, copy ) {\n\tvar f = x.flags;\n\tif ( typeof f !== 'object' || f === null ) {\n\t\treturn {};\n\t}\n\tif ( copy ) {\n\t\treturn assign( {}, f );\n\t}\n\treturn f;\n}\n\n\n// EXPORTS //\n\nexport default flags;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128',\n\t'BooleanArray': 'bool'\n};\n\n\n// EXPORTS //\n\nexport default ctor2dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\nimport BooleanArray from '@stdlib/array-bool';\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array,\n\tBooleanArray\n];\n\n\n// EXPORTS //\n\nexport default CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128',\n\t'bool'\n];\n\n\n// EXPORTS //\n\nexport default DTYPES;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './dtypes.js';\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport getter from '@stdlib/array-base-getter';\nimport dtype from '@stdlib/array-dtype';\n\n\n// MAIN //\n\n/**\n* Tests if an array is sorted in ascending order.\n*\n* @param {Collection} x - input array\n* @returns {boolean} boolean indicating if an array is sorted in ascending order\n*\n* @example\n* var out = isSortedAscending( [ 1, 2, 3 ] );\n* // returns true\n*\n* @example\n* var out = isSortedAscending( [ 3, 2, 1 ] );\n* // returns false\n*\n* @example\n* var out = isSortedAscending( [ 3, 3, 3 ] );\n* // returns true\n*\n* @example\n* var out = isSortedAscending( [ 3 ] );\n* // returns true\n*\n* @example\n* var out = isSortedAscending( [] );\n* // returns false\n*\n* @example\n* var out = isSortedAscending( [ 1, 3, 2 ] );\n* // returns false\n*/\nfunction isSortedAscending( x ) {\n\tvar len;\n\tvar get;\n\tvar dt;\n\tvar v1;\n\tvar v2;\n\tvar i;\n\n\t// Resolve the input array data type:\n\tdt = dtype( x );\n\n\t// Resolve an accessor for retrieving input array elements:\n\tif ( isAccessorArray( x ) ) {\n\t\tget = accessorGetter( dt );\n\t} else {\n\t\tget = getter( dt );\n\t}\n\t// Get the number of elements over which to iterate:\n\tlen = x.length;\n\n\t// Check for an empty array:\n\tif ( len === 0 ) {\n\t\treturn false;\n\t}\n\t// Loop over the elements...\n\tv1 = get( x, 0 );\n\tfor ( i = 1; i < len; i++ ) {\n\t\tv2 = get( x, i );\n\t\tif ( v1 > v2 ) {\n\t\t\treturn false;\n\t\t}\n\t\tv1 = v2;\n\t}\n\treturn true;\n}\n\n\n// EXPORTS //\n\nexport default isSortedAscending;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major-string';\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nimport isSortedAscending from '@stdlib/array-base-assert-is-sorted-ascending';\nimport toNormalizedIndices from '@stdlib/ndarray-base-to-unique-normalized-indices';\nimport getDType from '@stdlib/ndarray-base-dtype';\nimport getShape from '@stdlib/ndarray-base-shape';\nimport getStrides from '@stdlib/ndarray-base-strides';\nimport getOffset from '@stdlib/ndarray-base-offset';\nimport getOrder from '@stdlib/ndarray-base-order';\nimport getData from '@stdlib/ndarray-base-data-buffer';\nimport ones from '@stdlib/array-base-ones';\nimport zeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Expands the shape of an array to a specified dimensionality by spreading its dimensions to specified dimension indices and inserting dimensions of size one for the remaining dimensions.\n*\n* ## Notes\n*\n* - Each provided dimension index must reside on the interval `[-ndims, ndims-1]`. If provided a negative dimension index, the position at which to place a respective dimension is computed as `ndims + index`.\n* - Provided dimension indices must resolve to normalized dimension indices arranged in ascending order.\n*\n* @param {NonNegativeInteger} ndims - number of dimensions in the output array\n* @param {ndarray} x - input array\n* @param {IntegerArray} dims - dimension indices at which to spread array dimensions\n* @throws {RangeError} first argument must be greater than or equal to the number of dimensions in the input array\n* @throws {RangeError} must provide the same number of dimension indices as the number of dimensions in the input array\n* @throws {RangeError} must provide valid dimension indices\n* @throws {Error} must provide unique dimension indices\n* @throws {Error} dimension indices must resolve to normalized dimension indices arranged in ascending order\n* @returns {ndarray} output array\n*\n* @example\n* import array from '@stdlib/ndarray-array';\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = spreadDimensions( 5, x, [ 1, 3 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 1, 2, 1, 2, 1 ]\n*\n* var v = y.get( 0, 0, 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 0, 1, 0 );\n* // returns 2\n*\n* v = y.get( 0, 1, 0, 0, 0 );\n* // returns 3\n*\n* v = y.get( 0, 1, 0, 1, 0 );\n* // returns 4\n*/\nfunction spreadDimensions( ndims, x, dims ) {\n\tvar strides;\n\tvar shape;\n\tvar isrm;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar d;\n\tvar S;\n\tvar s;\n\tvar i;\n\tvar j;\n\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tord = getOrder( x );\n\tisrm = isRowMajor( ord );\n\n\tif ( sh.length > ndims ) {\n\t\tthrow new RangeError( format( 'invalid argument. First argument must be greater than or equal to the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `%d`.', sh.length, ndims ) );\n\t}\n\t// Resolve dimension indices...\n\td = toNormalizedIndices( dims, ndims-1 );\n\tif ( d === null ) {\n\t\tthrow new RangeError( format( 'invalid argument. Specified dimension index is out-of-bounds. Must be on the interval: [-%u, %u]. Value: `[%s]`.', ndims, ndims-1, dims.join( ', ' ) ) );\n\t}\n\tif ( d.length !== dims.length ) {\n\t\tthrow new Error( format( 'invalid argument. Must provide unique dimension indices. Value: `[%s]`.', dims.join( ', ' ) ) );\n\t}\n\tif ( d.length !== sh.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Must provide the same number of dimension indices as the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `[%s]`.', sh.length, dims.join( ', ' ) ) );\n\t}\n\tif ( d.length && !isSortedAscending( d ) ) {\n\t\tthrow new Error( format( 'invalid argument. Must provide dimension indices which resolve to nonnegative indices arranged in ascending order. Value: `[%s]`.', dims.join( ', ' ) ) );\n\t}\n\t// When provided a zero-dimensional array, every expanded dimension is a singleton dimension having zero stride...\n\tif ( sh.length === 0 ) {\n\t\tshape = ones( ndims );\n\t\tstrides = zeros( ndims );\n\t} else {\n\t\t// Interweave singleton dimensions...\n\t\tstrides = [];\n\t\tshape = [];\n\t\tj = 0;\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( i === d[ j ] ) {\n\t\t\t\t// If we have a match, we can move on to inserting singleton dimensions before the next dimension index...\n\t\t\t\tS = sh[ j ];\n\t\t\t\ts = st[ j ];\n\t\t\t\tj += 1;\n\t\t\t} else if ( j === sh.length ) { // append\n\t\t\t\t// We should only get here after exhausting all the dimension indices...\n\t\t\t\tS = 1;\n\t\t\t\ts = st[ j-1 ];\n\t\t\t\tif ( !isrm ) {\n\t\t\t\t\ts *= sh[ j-1 ];\n\t\t\t\t}\n\t\t\t} else { // insert before\n\t\t\t\t// We have yet to reach the next specified dimension index so we insert a singleton dimension...\n\t\t\t\tS = 1;\n\t\t\t\ts = st[ j ];\n\t\t\t\tif ( isrm ) {\n\t\t\t\t\ts *= sh[ j ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tshape.push( S );\n\t\t\tstrides.push( s );\n\t\t}\n\t}\n\tif ( isReadOnly( x ) ) {\n\t\t// If provided a read-only view, the returned array should also be read-only...\n\t\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), ord, { // eslint-disable-line max-len\n\t\t\t'readonly': true\n\t\t});\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), ord ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default spreadDimensions;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests whether an input value is the string representing row-major order.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean result\n*\n* @example\n* var bool = isRowMajorString( 'row-major' );\n* // returns true\n*\n* bool = isRowMajorString( 'column-major' );\n* // returns false\n*\n* bool = isRowMajorString( 'foo' );\n* // returns false\n*/\nfunction isRowMajorString( v ) {\n\treturn ( v === 'row-major' );\n}\n\n\n// EXPORTS //\n\nexport default isRowMajorString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a \"generic\" array filled with ones.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = ones( 3 );\n* // returns [ 1.0, 1.0, 1.0 ]\n*/\nfunction ones( len ) {\n\treturn filled( 1.0, len );\n}\n\n\n// EXPORTS //\n\nexport default ones;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport flag from '@stdlib/ndarray-base-flag';\n\n\n// MAIN //\n\n/**\n* Tests whether an ndarray is read-only.\n*\n* @param {ndarray} arr - input ndarray\n* @returns {boolean} boolean indicating whether an ndarray is read-only\n*\n* @example\n* import array from '@stdlib/ndarray-array';\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\nfunction isReadOnly( arr ) {\n\treturn ( flag( arr, 'READONLY' ) === true );\n}\n\n\n// EXPORTS //\n\nexport default isReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar getProto = Object.getPrototypeOf;\n\n\n// EXPORTS //\n\nexport default getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFunction from '@stdlib/assert-is-function';\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar getProto;\nif ( isFunction( Object.getPrototypeOf ) ) {\n\tgetProto = builtin;\n} else {\n\tgetProto = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport getProto from './proto.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {(Object|null)} prototype\n*/\nfunction getPrototypeOf( obj ) {\n\tvar proto = getProto( obj );\n\tif ( proto || proto === null ) {\n\t\treturn proto;\n\t}\n\tif ( nativeClass( obj.constructor ) === '[object Function]' ) {\n\t\t// May break if the constructor has been tampered with...\n\t\treturn obj.constructor.prototype;\n\t}\n\tif ( obj instanceof Object ) {\n\t\treturn Object.prototype;\n\t}\n\t// Return `null` for objects created via `Object.create( null )`. Also return `null` for cross-realm objects on browsers that lack `__proto__` support, such as IE < 11.\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the value of the `__proto__` property.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {*} value of `__proto__` property\n*/\nfunction getProto( obj ) {\n\t// eslint-disable-next-line no-proto\n\treturn obj.__proto__;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObject from '@stdlib/assert-is-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport getPrototypeOf from '@stdlib/utils-get-prototype-of';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar objectPrototype = Object.prototype;\n\n\n// FUNCTIONS //\n\n/**\n* Tests that an object only has own properties.\n*\n* @private\n* @param {Object} obj - value to test\n* @returns {boolean} boolean indicating if an object only has own properties\n*/\nfunction ownProps( obj ) {\n\tvar key;\n\n\t// NOTE: possibility of perf boost if key enumeration order is known (see http://stackoverflow.com/questions/18531624/isplainobject-thing).\n\tfor ( key in obj ) {\n\t\tif ( !hasOwnProp( obj, key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n\n// MAIN //\n\n/**\n* Tests if a value is a plain object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a plain object\n*\n* @example\n* var bool = isPlainObject( {} );\n* // returns true\n*\n* @example\n* var bool = isPlainObject( null );\n* // returns false\n*/\nfunction isPlainObject( value ) {\n\tvar proto;\n\n\t// Screen for obvious non-objects...\n\tif ( !isObject( value ) ) {\n\t\treturn false;\n\t}\n\t// Objects with no prototype (e.g., `Object.create( null )`) are plain...\n\tproto = getPrototypeOf( value );\n\tif ( !proto ) {\n\t\treturn true;\n\t}\n\t// Objects having a prototype are plain if and only if they are constructed with a global `Object` function and the prototype points to the prototype of a plain object...\n\treturn (\n\t\t// Cannot have own `constructor` property:\n\t\t!hasOwnProp( value, 'constructor' ) &&\n\n\t\t// Prototype `constructor` property must be a function (see also https://bugs.jquery.com/ticket/9897 and http://stackoverflow.com/questions/18531624/isplainobject-thing):\n\t\thasOwnProp( proto, 'constructor' ) &&\n\t\tisFunction( proto.constructor ) &&\n\t\tnativeClass( proto.constructor ) === '[object Function]' &&\n\n\t\t// Test for object-specific method:\n\t\thasOwnProp( proto, 'isPrototypeOf' ) &&\n\t\tisFunction( proto.isPrototypeOf ) &&\n\n\t\t(\n\t\t\t// Test if the prototype matches the global `Object` prototype (same realm):\n\t\t\tproto === objectPrototype ||\n\n\t\t\t// Test that all properties are own properties (cross-realm; *most* likely a plain object):\n\t\t\townProps( value )\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPlainObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Object from '@stdlib/object-ctor';\nimport getProto from './detect.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @param {*} value - input value\n* @returns {(Object|null)} prototype\n*\n* @example\n* var proto = getPrototypeOf( {} );\n* // returns {}\n*/\nfunction getPrototypeOf( value ) {\n\tif (\n\t\tvalue === null ||\n\t\tvalue === void 0\n\t) {\n\t\treturn null;\n\t}\n\t// In order to ensure consistent ES5/ES6 behavior, cast input value to an object (strings, numbers, booleans); ES5 `Object.getPrototypeOf` throws when provided primitives and ES6 `Object.getPrototypeOf` casts:\n\tvalue = Object( value );\n\n\treturn getProto( value );\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is array-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is array-like\n*\n* @example\n* var bool = isArrayLike( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLike( {'length':10} );\n* // returns true\n*/\nfunction isArrayLike( value ) {\n\treturn (\n\t\tvalue !== void 0 &&\n\t\tvalue !== null &&\n\t\ttypeof value !== 'function' &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Buffer === 'function' ) ? Buffer : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = require( 'buffer' ).Buffer; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Buffer constructor.\n*\n* @module @stdlib/buffer-ctor\n*\n* @example\n* import ctor from '@stdlib/buffer-ctor';\n*\n* var b = new ctor( [ 1, 2, 3, 4 ] );\n* // returns \n*/\n\n// MODULES //\n\nimport hasNodeBufferSupport from '@stdlib/assert-has-node-buffer-support';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasNodeBufferSupport() ) {\n\tctor = main;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport GlobalBuffer from './buffer.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Buffer` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Buffer` support\n*\n* @example\n* var bool = hasNodeBufferSupport();\n* // returns \n*/\nfunction hasNodeBufferSupport() {\n\tvar bool;\n\tvar b;\n\n\tif ( typeof GlobalBuffer !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tif ( typeof GlobalBuffer.from === 'function' ) {\n\t\t\tb = GlobalBuffer.from( [ 1, 2, 3, 4 ] );\n\t\t} else {\n\t\t\tb = new GlobalBuffer( [ 1, 2, 3, 4 ] ); // Note: this is deprecated behavior starting in Node v6 (see https://nodejs.org/api/buffer.html#buffer_new_buffer_array)\n\t\t}\n\t\tbool = (\n\t\t\tisBuffer( b ) &&\n\t\t\tb[ 0 ] === 1 &&\n\t\t\tb[ 1 ] === 2 &&\n\t\t\tb[ 2 ] === 3 &&\n\t\t\tb[ 3 ] === 4\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasNodeBufferSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write (browser) polyfill\n\n// MAIN //\n\n/**\n* Buffer constructor.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Allocate a buffer having a specified number of bytes.\n*\n* @module @stdlib/buffer-alloc-unsafe\n*\n* @example\n* import allocUnsafe from '@stdlib/buffer-alloc-unsafe';\n*\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasAllocUnsafe from './has_alloc_unsafe.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar allocUnsafe;\nif ( hasAllocUnsafe ) {\n\tallocUnsafe = main;\n} else {\n\tallocUnsafe = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFunction from '@stdlib/assert-is-function';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\nvar bool = isFunction( Buffer.allocUnsafe );\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport format from '@stdlib/string-format';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\n/**\n* Allocates a buffer having a specified number of bytes.\n*\n* ## Notes\n*\n* - The underlying memory of returned `Buffer` instances is not initialized. Memory contents are unknown and may contain sensitive data.\n* - When the size is less than half the pool size (specified on the `Buffer` constructor), memory is allocated from the `Buffer` pool for faster allocation of new `Buffer` instances.\n*\n* @param {NonNegativeInteger} size - number of bytes to allocate\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {Buffer} new `Buffer` instance\n*\n* @example\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\nfunction allocUnsafe( size ) {\n\tif ( !isNonNegativeInteger( size ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', size ) );\n\t}\n\treturn Buffer.allocUnsafe( size );\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport format from '@stdlib/string-format';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\n/**\n* Allocates a buffer having a specified number of bytes.\n*\n* ## Notes\n*\n* - The underlying memory of returned `Buffer` instances is not initialized. Memory contents are unknown and may contain sensitive data.\n* - When the size is less than half the pool size (specified on the `Buffer` constructor), memory is allocated from the `Buffer` pool for faster allocation of new `Buffer` instances.\n*\n* @param {NonNegativeInteger} size - number of bytes to allocate\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {Buffer} new `Buffer` instance\n*\n* @example\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\nfunction allocUnsafe( size ) {\n\tif ( !isNonNegativeInteger( size ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', size ) );\n\t}\n\treturn new Buffer( size );\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport allocUnsafe from '@stdlib/buffer-alloc-unsafe';\nimport ctors from '@stdlib/array-typed-ctors';\nimport zeros from '@stdlib/array-base-zeros';\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tvar nbytes;\n\tvar offset;\n\tvar dtype;\n\tvar ctor;\n\tvar buf;\n\tvar out;\n\tvar nb;\n\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn zeros( length );\n\t}\n\tnbytes = bytesPerElement( dtype );\n\tif ( nbytes === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) );\n\t}\n\t// Resolve typed array constructor:\n\tctor = ctors( dtype );\n\n\t// Compute the number of bytes to allocate:\n\tnb = nbytes * length;\n\tif ( dtype === 'complex128' ) {\n\t\tnb += 8; // Note: need to allocate additional bytes to ensure alignment\n\t}\n\t// Allocate binary buffer:\n\tbuf = allocUnsafe( nb );\n\n\t// Resolve the byte offset:\n\toffset = buf.byteOffset;\n\tif ( dtype === 'complex128' ) {\n\t\tif ( !isNonNegativeInteger( offset/nbytes ) ) {\n\t\t\toffset += 8; // Note: ensure alignment\n\t\t}\n\t}\n\t// Reinterpret the binary buffer:\n\tout = new ctor( buf.buffer, offset, length );\n\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default empty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized array having a specified length.\n*\n* @module @stdlib/array-empty\n*\n* @example\n* import empty from '@stdlib/array-empty';\n*\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* import empty from '@stdlib/array-empty';\n*\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\n\n// MODULES //\n\nimport isBufferUint8Array from './is_buffer_uint8array.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar empty;\nif ( isBufferUint8Array() ) {\n\tempty = main;\n} else {\n\tempty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default empty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport allocUnsafe from '@stdlib/buffer-alloc-unsafe';\nimport isUint8Array from '@stdlib/assert-is-uint8array';\n\n\n// MAIN //\n\n/**\n* Checks whether an environment supports Node.js buffer instances which inherit from `Uint8Array`.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment supports Node.js buffer instances inheriting from `Uint8Array`\n*\n* @example\n* var bool = check();\n* // returns \n*/\nfunction check() {\n\tvar buf = allocUnsafe( 1 );\n\treturn isUint8Array( buf );\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns a typed array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLike from '@stdlib/assert-is-array-like';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array-like object passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array-like object function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arraylikefcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arraylikefcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array-like object passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array-like object for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArrayLike( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arraylikefcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an array-like object containing only nonnegative integers.\n*\n* @module @stdlib/assert-is-nonnegative-integer-array\n*\n* @example\n* import isNonNegativeIntegerArray from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ 3.0, new Number(3.0) ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 3.0, '3.0' ] );\n* // returns false\n*\n* @example\n* import { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ 1.0, 0.0, 10.0 ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 3.0, new Number(1.0) ] );\n* // returns false\n*\n* @example\n* import { objects as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ new Number(3.0), new Number(1.0) ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 1.0, 0.0, 10.0 ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-like-function';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isNonNegativeInteger.isPrimitive );\nvar isObjectArray = arrayfun( isNonNegativeInteger.isObject );\n\n\n// MAIN //\n\nvar isNonNegativeIntegerArray = arrayfun( isNonNegativeInteger );\nsetReadOnly( isNonNegativeIntegerArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isNonNegativeIntegerArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isNonNegativeIntegerArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an array-like object containing only integers.\n*\n* @module @stdlib/assert-is-integer-array\n*\n* @example\n* import isIntegerArray from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ -3.0, new Number(0.0), 2.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -3.0, '3.0' ] );\n* // returns false\n*\n* @example\n* import { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ -1.0, 10.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -1.0, 0.0, 5.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -3.0, new Number(-1.0) ] );\n* // returns false\n*\n* @example\n* import { objects as isIntegerArray } from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ new Number(1.0), new Number(3.0) ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -1.0, 0.0, 3.0 ] );\n* // returns false\n*\n* bool = isIntegerArray( [ 3.0, new Number(-1.0) ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport isInteger from '@stdlib/assert-is-integer';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-like-function';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isInteger.isPrimitive );\nvar isObjectArray = arrayfun( isInteger.isObject );\n\n\n// MAIN //\n\nvar isIntegerArray = arrayfun( isInteger );\nsetReadOnly( isIntegerArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isIntegerArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isIntegerArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport orders from '@stdlib/ndarray-orders';\n\n\n// VARIABLES //\n\nvar ORDERS = orders();\nvar len = ORDERS.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is an ndarray order.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is an ndarray order\n*\n* @example\n* var bool = isOrder( 'row-major' );\n* // returns true\n*\n* bool = isOrder( 'column-major' );\n* // returns true\n*\n* bool = isOrder( 'foo' );\n* // returns false\n*/\nfunction isOrder( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === ORDERS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isOrder;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport replace from '@stdlib/string-base-replace';\nimport DTYPES from './dtypes.json';\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of ndarray data types\n*\n* @example\n* var list = dtypes();\n* // returns [...]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable stdlib/empty-line-before-comment */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects. While certain dtypes, such as \"generic\" and \"binary\", have special behavior in JavaScript, they do not have a direct complement in C.\n*\n* @private\n* @returns {Object} object mapping supported dtypes to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `dtypes.h` enumeration!!!!\n\treturn {\n\t\t// Boolean data types:\n\t\t'bool': 0,\n\n\t\t// Integer data types:\n\t\t'int8': 1,\n\t\t'uint8': 2,\n\t\t'uint8c': 3,\n\t\t'int16': 4,\n\t\t'uint16': 5,\n\t\t'int32': 6,\n\t\t'uint32': 7,\n\t\t'int64': 8,\n\t\t'uint64': 9,\n\t\t// 'int128': 10, // uncomment once supported\n\t\t// 'uint128': 11,\n\t\t// 'int256': 12,\n\t\t// 'uint256': 13,\n\n\t\t// Floating-point data types:\n\t\t// 'float16': 14,\n\t\t// 'bfloat16': 15,\n\t\t'float32': 10,\n\t\t'float64': 11,\n\t\t// 'float128': 18, // uncomment once supported\n\n\t\t// Complex floating-point number data types:\n\t\t'complex64': 12,\n\t\t'complex128': 13,\n\n\t\t// Data type for \"binary\" data (i.e., data stored in a Node.js `Buffer` object):\n\t\t'binary': 14,\n\n\t\t// Data type for \"generic\" JavaScript values (objects):\n\t\t'generic': 15,\n\n\t\t// Define a signaling value which is guaranteed not to be a valid type enumeration value:\n\t\t'notype': 17,\n\n\t\t// Indicate the start of user defined type numbers (leaving room for type growth above):\n\t\t'userdefined_type': 256\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumeration;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types.\n*\n* @module @stdlib/ndarray-dtypes\n*\n* @example\n* import dtypes from '@stdlib/ndarray-dtypes';\n*\n* var list = dtypes();\n* // returns [...]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\nimport objectKeys from '@stdlib/utils-keys';\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport dtypes from '@stdlib/ndarray-dtypes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray data type.\n*\n* @name isDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray data type\n*\n* @example\n* var bool = isDataType( 'binary' );\n* // returns true\n*\n* bool = isDataType( 'float32' );\n* // returns true\n*\n* bool = isDataType( 'float64' );\n* // returns true\n*\n* bool = isDataType( 'generic' );\n* // returns true\n*\n* bool = isDataType( 'int16' );\n* // returns true\n*\n* bool = isDataType( 'int32' );\n* // returns true\n*\n* bool = isDataType( 'int8' );\n* // returns true\n*\n* bool = isDataType( 'uint16' );\n* // returns true\n*\n* bool = isDataType( 'uint32' );\n* // returns true\n*\n* bool = isDataType( 'uint8' );\n* // returns true\n*\n* bool = isDataType( 'uint8c' );\n* // returns true\n*\n* bool = isDataType( 'foo' );\n* // returns false\n*/\nvar isDataType = contains( dtypes() );\n\n\n// EXPORTS //\n\nexport default isDataType;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default ndarray settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32',\n\t\t\t'boolean': 'bool'\n\t\t},\n\n\t\t// Memory layout:\n\t\t'order': 'row-major',\n\n\t\t// Casting mode:\n\t\t'casting': 'safe',\n\n\t\t// Index mode:\n\t\t'index_mode': 'throw'\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'order': DEFAULTS.order,\n\t'casting': DEFAULTS.casting,\n\t'index_mode': DEFAULTS.index_mode\n};\n\n\n// MAIN //\n\n/**\n* Returns a default ndarray setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Tests that a value is a valid constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {(Error|null)} error object or null\n*\n* @example\n* var ctor = function ctor() {};\n*\n* var err = validate( ctor );\n* // returns null\n*\n* err = validate( null );\n* // returns \n*/\nfunction validate( value ) {\n\tvar type = typeof value;\n\tif (\n\t\tvalue === null ||\n\t\t(type !== 'object' && type !== 'function')\n\t) {\n\t\treturn new TypeError( format( 'invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.', value ) );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return default ndarray settings.\n*\n* @module @stdlib/ndarray-defaults\n*\n* @example\n* import defaults from '@stdlib/ndarray-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Object.create;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Dummy constructor.\n*\n* @private\n*/\nfunction Ctor() {\n\t// Empty...\n}\n\n\n// MAIN //\n\n/**\n* An `Object.create` shim for older JavaScript engines.\n*\n* @private\n* @param {Object} proto - prototype\n* @returns {Object} created object\n*\n* @example\n* var obj = createObject( Object.prototype );\n* // returns {}\n*/\nfunction createObject( proto ) {\n\tCtor.prototype = proto;\n\treturn new Ctor();\n}\n\n\n// EXPORTS //\n\nexport default createObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar createObject;\nif ( typeof builtin === 'function' ) {\n\tcreateObject = builtin;\n} else {\n\tcreateObject = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default createObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Restricts an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = clampIndex( -1, 10 );\n* // returns 0\n*\n* idx = clampIndex( 15, 10 );\n* // returns 10\n*\n* idx = clampIndex( 5, 10 );\n* // returns 5\n*/\nfunction clampIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\treturn 0;\n\t}\n\tif ( idx > max ) {\n\t\treturn max;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default clampIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Wraps an index on the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = wrapIndex( -1, 10 );\n* // returns 10\n*\n* idx = wrapIndex( 13, 10 );\n* // returns 2\n*\n* idx = wrapIndex( 6, 10 );\n* // returns 6\n*/\nfunction wrapIndex( idx, max ) {\n\tvar mp1 = max + 1;\n\tif ( idx < 0 ) {\n\t\tidx += mp1; // slight optimization to avoid modulo arithmetic when |idx| <= max+1\n\t\tif ( idx < 0 ) {\n\t\t\tidx %= mp1;\n\t\t\tif ( idx !== 0 ) {\n\t\t\t\tidx += mp1;\n\t\t\t}\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\tidx -= mp1; // slight optimization to avoid modulo arithmetic when max+1 < idx <= 2*(max+1)\n\t\tif ( idx > max ) {\n\t\t\tidx %= mp1;\n\t\t}\n\t\treturn idx;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default wrapIndex;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport modes from '@stdlib/ndarray-index-modes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray index mode.\n*\n* @name isIndexMode\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray index mode\n*\n* @example\n* var bool = isIndexMode( 'wrap' );\n* // returns true\n*\n* bool = isIndexMode( 'clamp' );\n* // returns true\n*\n* bool = isIndexMode( 'throw' );\n* // returns true\n*\n* bool = isIndexMode( 'foo' );\n* // returns false\n*/\nvar isIndexMode = contains( modes() );\n\n\n// EXPORTS //\n\nexport default isIndexMode;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport clampIndex from '@stdlib/ndarray-base-clamp-index';\nimport wrapIndex from '@stdlib/ndarray-base-wrap-index';\nimport normalize from '@stdlib/ndarray-base-normalize-index';\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar TABLE = {\n\t'wrap': wrapIndex,\n\t'clamp': clampIndex,\n\t'normalize': normalizeIndex,\n\t'throw': throwIfOutOfBounds\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an index if within bounds and throw an error otherwise.\n*\n* @private\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = throwIfOutOfBounds( 2, 9 );\n* // returns 2\n*\n* idx = throwIfOutOfBounds( 10, 9 );\n* // throws \n*\n* idx = throwIfOutOfBounds( -1, 9 );\n* // throws \n*/\nfunction throwIfOutOfBounds( idx, max ) {\n\tif ( idx < 0 || idx > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn idx;\n}\n\n/**\n* Normalizes an index before performing a strict bounds check.\n*\n* @private\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = normalizeIndex( 1, 10 );\n* // returns 1\n*\n* idx = normalizeIndex( -4, 10 );\n* // returns 7\n*\n* idx = normalizeIndex( -100, 10 );\n* // throws \n*/\nfunction normalizeIndex( idx, max ) {\n\tvar index = normalize( idx, max );\n\tif ( index < 0 || index > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn index;\n}\n\n\n// MAIN //\n\n/**\n* Returns a function for returning an index according to a provided index mode.\n*\n* @param {string} mode - specifies how to handle an out-of-bounds index\n* @throws {TypeError} first argument must be a recognized index mode\n* @returns {Function} function for returning an index\n*\n* @example\n* var ind = factory( 'clamp' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // returns 9\n*\n* idx = ind( -1, 9 );\n* // returns 0\n*\n* @example\n* var ind = factory( 'wrap' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // returns 0\n*\n* idx = ind( -1, 9 );\n* // returns 9\n*\n* @example\n* var ind = factory( 'throw' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // throws \n*\n* idx = ind( -1, 9 );\n* // throws \n*\n* @example\n* var ind = factory( 'normalize' );\n*\n* var idx = ind( 1, 10 );\n* // returns 1\n*\n* idx = ind( -4, 10 );\n* // returns 7\n*\n* idx = ind( -100, 10 );\n* // throws \n*/\nfunction factory( mode ) {\n\tif ( !isIndexMode( mode ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a recognized index mode. Value: `%s`.', mode ) );\n\t}\n\treturn TABLE[ mode ];\n}\n\n\n// EXPORTS //\n\nexport default factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport clampIndex from '@stdlib/ndarray-base-clamp-index';\nimport wrapIndex from '@stdlib/ndarray-base-wrap-index';\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an index given an index mode.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @param {string} mode - specifies how to handle an index outside the interval `[0,max]`\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = ind( 2, 9, 'clamp' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'clamp' );\n* // returns 9\n*\n* idx = ind( -1, 9, 'clamp' );\n* // returns 0\n*\n* @example\n* var idx = ind( 2, 9, 'wrap' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'wrap' );\n* // returns 0\n*\n* idx = ind( -1, 9, 'wrap' );\n* // returns 9\n*\n* @example\n* var idx = ind( 2, 9, 'throw' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'throw' );\n* // throws \n*\n* idx = ind( -1, 9, 'throw' );\n* // throws \n*\n* @example\n* var idx = ind( 1, 10, 'normalize' );\n* // returns 1\n*\n* idx = ind( -4, 10, 'normalize' );\n* // returns 7\n*\n* idx = ind( -100, 10, 'normalize' );\n* // throws \n*/\nfunction ind( idx, max, mode ) {\n\tvar index;\n\tif ( mode === 'clamp' ) {\n\t\treturn clampIndex( idx, max );\n\t}\n\tif ( mode === 'wrap' ) {\n\t\treturn wrapIndex( idx, max );\n\t}\n\tindex = idx;\n\tif ( mode === 'normalize' ) {\n\t\tindex = normalizeIndex( index, max );\n\t}\n\tif ( index < 0 || index > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn index;\n}\n\n\n// EXPORTS //\n\nexport default ind;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an index given an index mode.\n*\n* @module @stdlib/ndarray-base-ind\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( -1, 10, 'wrap' );\n* // returns 10\n*\n* idx = ind( 14, 10, 'wrap' );\n* // returns 3\n*\n* idx = ind( 6, 10, 'wrap' );\n* // returns 6\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( -1, 10, 'clamp' );\n* // returns 0\n*\n* idx = ind( 14, 10, 'clamp' );\n* // returns 10\n*\n* idx = ind( 6, 10, 'clamp' );\n* // returns 6\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( 1, 10, 'throw' );\n* // returns 1\n*\n* idx = ind( 14, 10, 'throw' );\n* // throws \n*\n* idx = ind( -1, 10, 'throw' );\n* // throws \n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( 1, 10, 'normalize' );\n* // returns 1\n*\n* idx = ind( -4, 10, 'normalize' );\n* // returns 7\n*\n* idx = ind( -100, 10, 'normalize' );\n* // throws \n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var fcn = ind.factory( 'clamp' );\n*\n* var idx = fcn( -1, 10 );\n* // returns 0\n*\n* idx = fcn( 14, 10 );\n* // returns 10\n*\n* idx = fcn( 6, 10 );\n* // returns 6\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport factory from './factory.js';\nimport main from './main.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iget;\n\n\n// MAIN //\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\treturn base.call( this, idx );\n\t}\n\treturn base.call( this );\n}\n\n\n// EXPORTS //\n\nexport default iget;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// METHODS //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iset;\n\n\n// MAIN //\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\tbase.call( this, idx, v );\n\t} else {\n\t\tbase.call( this, idx );\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default iset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies the contents of array-like value to a new array.\n*\n* @private\n* @param {ArrayLike} arr - input array\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var arr = [ 1.0, 2.0, 3.0 ];\n*\n* var out = copy( arr, arr.length );\n* // returns [ 1.0, 2.0, 3.0 ]\n*\n* var bool = ( arr === out );\n* // returns false\n*/\nfunction copy( arr, len ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( arr[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default copy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isCollection from '@stdlib/assert-is-collection';\nimport { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nimport numel from '@stdlib/ndarray-base-numel';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport defaults from '@stdlib/ndarray-defaults';\nimport inherit from '@stdlib/utils-inherit';\nimport format from '@stdlib/string-format';\nimport iget from './iget.js';\nimport iset from './iset.js';\nimport get from './get.js';\nimport set from './set.js';\nimport copy from './copy_array.js';\nimport validate from './validate.js';\n\n\n// VARIABLES //\n\n/*\n* See the following references:\n*\n* - https://stackoverflow.com/questions/22747068/is-there-a-max-number-of-arguments-javascript-functions-can-accept\n* - https://bugs.webkit.org/show_bug.cgi?id=80797\n* - https://github.com/numpy/numpy/issues/5744\n*\n* Note that the maximum number of function arguments can vary from engine to engine. Here, we choose something of a lowest common denominator which may **not** be valid everywhere.\n*/\nvar MAX_DIMS = 32767|0;\n\nvar INDEX_MODE = defaults.get( 'index_mode' );\nvar READONLY = false;\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {Collection} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} `dtype` argument must be a supported ndarray data type\n* @throws {TypeError} `buffer` argument must be an array-like object, typed-array-like, or a Buffer\n* @throws {TypeError} `buffer` argument `get` and `set` properties must be functions\n* @throws {TypeError} `shape` argument must be an array-like object containing nonnegative integers\n* @throws {Error} `shape` argument length must equal the number of dimensions\n* @throws {TypeError} `strides` argument must be an array-like object containing integers\n* @throws {Error} `strides` argument length must equal the number of dimensions (except for zero-dimensional arrays; in which case, the `strides` argument length must be equal to `1`)\n* @throws {Error} for zero-dimensional ndarrays, the `strides` argument must contain a single element equal to `0`\n* @throws {TypeError} `offset` argument must be a nonnegative integer\n* @throws {TypeError} `order` argument must be a supported ndarray order\n* @throws {Error} `buffer` argument must be compatible with specified meta data\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} too many dimensions\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order, options ) {\n\tvar ndims;\n\tvar opts;\n\tvar err;\n\tvar sh;\n\tvar st;\n\n\tif ( !(this instanceof ndarray) ) {\n\t\tif ( arguments.length < 7 ) {\n\t\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t\t}\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order, options ); // eslint-disable-line max-len\n\t}\n\tif ( !isDataType( dtype ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a supported ndarray data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( !isCollection( buffer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.', buffer ) );\n\t} else if ( buffer.get && buffer.set && ( !isFunction( buffer.get ) || !isFunction( buffer.set ) ) ) { // eslint-disable-line max-len\n\t\tthrow new TypeError( format( 'invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.', buffer ) );\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tif ( !isCollection( shape) || shape.length > 0 ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t}\n\tndims = shape.length;\n\tif ( ndims > MAX_DIMS ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.', MAX_DIMS, ndims ) );\n\t}\n\tif ( !isIntegerArray( strides ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.', strides ) );\n\t}\n\tif ( ndims > 0 ) {\n\t\tif ( strides.length !== ndims ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.', ndims, strides.length ) );\n\t\t}\n\t} else if ( strides.length !== 1 ) {\n\t\tthrow new RangeError( 'invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.' );\n\t} else if ( strides[ 0 ] !== 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.', strides[ 0 ] ) );\n\t}\n\tif ( !isNonNegativeInteger( offset ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.', offset ) );\n\t}\n\tif ( !isOrder( order ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Sixth argument must be a supported order. Value: `%s`.', order ) );\n\t}\n\tif ( ndims > 0 && !isBufferLengthCompatible( buffer.length, shape, strides, offset ) && numel( shape ) > 0 ) { // eslint-disable-line max-len\n\t\tthrow new Error( 'invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.' );\n\t}\n\topts = {};\n\topts.mode = INDEX_MODE;\n\topts.readonly = READONLY;\n\tif ( arguments.length > 6 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tthis._mode = opts.mode;\n\tif ( opts.submode === void 0 ) {\n\t\topts.submode = [ this._mode ];\n\t}\n\tthis._submode = opts.submode;\n\n\t// Copy `shape` and `strides` to prevent external mutation:\n\tsh = copy( shape, ndims );\n\tst = copy( strides, ndims || 1 );\n\n\t// Call the parent constructor:\n\tparent.call( this, dtype, buffer, sh, st, offset, order );\n\tthis._flags.READONLY = opts.readonly;\n\n\treturn this;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n// Inherit from the parent constructor:\ninherit( ndarray, parent );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', get );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', iget );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', set );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', iset );\n\n\n// EXPORTS //\n\nexport default ndarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport minmax from '@stdlib/ndarray-base-minmax-view-buffer-index';\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data.\n*\n* @param {NonNegativeInteger} len - buffer length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if a buffer length is compatible\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns false\n*/\nfunction isBufferLengthCompatible( len, shape, strides, offset ) {\n\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\tvar buf = minmax( shape, strides, offset );\n\n\t// If the indices are \"inbounds\", then the buffer length is compatible:\n\treturn ( buf[ 0 ] >= 0 && buf[ 1 ] < len );\n}\n\n\n// EXPORTS //\n\nexport default isBufferLengthCompatible;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObject from '@stdlib/assert-is-plain-object';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArray from '@stdlib/assert-is-array';\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.mode] - specifies how to handle indices which exceed array dimensions\n* @param {string} [options.submode] - specifies how to handle subscripts which exceed array dimensions\n* @param {boolean} [options.readonly] - boolean indicating whether an array should be read-only\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'clamp',\n* 'submode': [ 'throw', 'wrap', 'clamp' ]\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tvar i;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isIndexMode( opts.mode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a recognized mode. Option: `%s`.', 'mode', opts.mode ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\topts.submode = options.submode;\n\t\tif ( !isArray( opts.submode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode ) );\n\t\t}\n\t\tif ( opts.submode.length === 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode.join( ',' ) ) );\n\t\t}\n\t\tfor ( i = 0; i < opts.submode.length; i++ ) {\n\t\t\tif ( !isIndexMode( opts.submode[ i ] ) ) {\n\t\t\t\treturn new TypeError( format( 'invalid option. Each submode must be a recognized mode. Option: `%s`.', opts.submode[ i ] ) );\n\t\t\t}\n\t\t}\n\t\topts.submode = opts.submode.slice();\n\t}\n\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\topts.readonly = options.readonly;\n\t\tif ( !isBoolean( opts.readonly ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', opts.readonly ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\nimport format from '@stdlib/string-format';\nimport validate from './validate.js';\nimport createObject from './detect.js';\n\n\n// MAIN //\n\n/**\n* Implements prototypical inheritance by replacing the prototype of one constructor with the prototype of another constructor.\n*\n* ## Notes\n*\n* - This implementation is not designed to work with ES2015/ES6 classes. For ES2015/ES6 classes, use `class` with `extends`.\n* - For reference, see [node#3455](https://github.com/nodejs/node/pull/3455), [node#4179](https://github.com/nodejs/node/issues/4179), [node#3452](https://github.com/nodejs/node/issues/3452), and [node commit](https://github.com/nodejs/node/commit/29da8cf8d7ab8f66b9091ab22664067d4468461e#diff-3deb3f32958bb937ae05c6f3e4abbdf5).\n*\n* @param {(Object|Function)} ctor - constructor which will inherit\n* @param {(Object|Function)} superCtor - super (parent) constructor\n* @throws {TypeError} first argument must be either an object or a function which can inherit\n* @throws {TypeError} second argument must be either an object or a function from which a constructor can inherit\n* @throws {TypeError} second argument must have an inheritable prototype\n* @returns {(Object|Function)} child constructor\n*\n* @example\n* function Foo() {\n* return this;\n* }\n* Foo.prototype.beep = function beep() {\n* return 'boop';\n* };\n*\n* function Bar() {\n* Foo.call( this );\n* return this;\n* }\n* inherit( Bar, Foo );\n*\n* var bar = new Bar();\n* var v = bar.beep();\n* // returns 'boop'\n*/\nfunction inherit( ctor, superCtor ) {\n\tvar err = validate( ctor );\n\tif ( err ) {\n\t\tthrow err;\n\t}\n\terr = validate( superCtor );\n\tif ( err ) {\n\t\tthrow err;\n\t}\n\tif ( typeof superCtor.prototype === 'undefined' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.', superCtor.prototype ) );\n\t}\n\t// Create a prototype which inherits from the parent prototype:\n\tctor.prototype = createObject( superCtor.prototype );\n\n\t// Set the constructor to refer to the child constructor:\n\tdefineProperty( ctor.prototype, 'constructor', {\n\t\t'configurable': true,\n\t\t'enumerable': false,\n\t\t'writable': true,\n\t\t'value': ctor\n\t});\n\n\treturn ctor;\n}\n\n\n// EXPORTS //\n\nexport default inherit;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {*} array element\n*/\nfunction get() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( arguments.length !== this._ndims ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( arguments.length !== this._ndims+1 ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default set;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPlainObject from '@stdlib/assert-is-plain-object';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArrayLike from '@stdlib/assert-is-array-like';\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport strides2offset from '@stdlib/ndarray-base-strides2offset';\nimport emptyArray from '@stdlib/array-empty';\nimport allocUnsafe from '@stdlib/buffer-alloc-unsafe';\nimport numel from '@stdlib/ndarray-base-numel';\nimport ndarray from '@stdlib/ndarray-ctor';\nimport defaults from '@stdlib/ndarray-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DTYPE = defaults.get( 'dtypes.default' );\nvar ORDER = defaults.get( 'order' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having a specified shape and data type.\n*\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} shape - array shape\n* @param {Options} [options] - options\n* @param {string} [options.dtype='float64'] - data type\n* @param {string} [options.order='row-major'] - array order\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @throws {TypeError} first argument must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a recognized data type\n* @throws {TypeError} `order` option must be a recognized array order\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = empty( [ 2, 2 ] );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float64'\n*/\nfunction empty( shape ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = DTYPE;\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = ORDER;\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t} else {\n\t\tdtype = DTYPE;\n\t\torder = ORDER;\n\t}\n\tif ( typeof shape === 'number' ) {\n\t\tsh = [ shape ];\n\t} else if ( isArrayLike( shape ) ) {\n\t\tsh = shape;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tif ( len !== len || len < 0 ) {\n\t\t\t// We should only get here if we've been provided an invalid shape (e.g., an array containing negative integers, etc)...\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default empty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Formats an error message for production.\n*\n* @param {string} code - error code\n* @param {*} ...args - error message arguments\n* @returns {string} formatted error message\n*\n* @example\n* var msg = fmtprodmsg( '3', 'wrong_type' );\n* // returns 'https://stdlib.io/e/3?&arg[]=wrong_type'\n*/\nfunction fmtprodmsg() {\n\tvar a = arguments;\n\tvar c = a[ 0 ];\n\tvar u = 'https://stdlib.io/e/'+c+'?';\n\tvar i;\n\tfor ( i = 1; i < a.length; i++ ) {\n\t\tu += '&arg[]=' + encodeURIComponent( a[ i ] );\n\t}\n\treturn u;\n}\n\n\n// EXPORTS //\n\nexport default fmtprodmsg;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObject from '@stdlib/assert-is-plain-object';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\nimport isEmptyCollection from '@stdlib/assert-is-empty-collection';\nimport normalizeIndices from '@stdlib/ndarray-base-to-unique-normalized-indices';\nimport join from '@stdlib/array-base-join';\nimport format from '@stdlib/error-tools-fmtprodmsg';\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {NonNegativeInteger} ndims - number of input ndarray dimensions\n* @param {Options} options - function options\n* @param {boolean} [options.keepdims] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'keepdims': true\n* };\n* var err = validate( opts, 3, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, ndims, options ) {\n\tvar tmp;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'null2V', options ) );\n\t}\n\tif ( hasOwnProp( options, 'keepdims' ) ) {\n\t\topts.keepdims = options.keepdims;\n\t\tif ( !isBoolean( opts.keepdims ) ) {\n\t\t\treturn new TypeError( format( 'null2o', 'keepdims', opts.keepdims ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'dims' ) ) {\n\t\topts.dims = options.dims;\n\t\tif ( !isIntegerArray( opts.dims ) && !isEmptyCollection( opts.dims ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array of integers. Option: `%s`.', 'dims', opts.dims ) );\n\t\t}\n\t\ttmp = normalizeIndices( opts.dims, ndims-1 );\n\t\tif ( tmp === null ) {\n\t\t\treturn new RangeError( format( 'invalid option. `%s` option contains an out-of-bounds dimension index. Option: [%s].', 'dims', join( opts.dims, ',' ) ) );\n\t\t}\n\t\tif ( tmp.length !== opts.dims.length ) {\n\t\t\treturn new Error( format( 'invalid option. `%s` option contains duplicate indices. Option: [%s].', 'dims', join( opts.dims, ',' ) ) );\n\t\t}\n\t\tif ( tmp.length > ndims ) {\n\t\t\treturn new RangeError( format( 'invalid option. `%s` option specifies more dimensions than exists in the input array. Number of dimensions: %d. Option: [%s].', ndims, join( opts.dims, ',' ) ) );\n\t\t}\n\t\topts.dims = tmp;\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if a value is an empty collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an empty collection\n*\n* @example\n* var bool = isEmptyCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isEmptyCollection( { 'length': 0 } );\n* // returns true\n*\n* @example\n* var bool = isEmptyCollection( [ 1, 2, 3 ] );\n* // returns false\n*\n* @example\n* var bool = isEmptyCollection( {} );\n* // returns false\n*/\nfunction isEmptyCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.length === 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isEmptyCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isndarrayLike from '@stdlib/assert-is-ndarray-like';\nimport unaryReduceSubarray from '@stdlib/ndarray-base-unary-reduce-subarray';\nimport base from '@stdlib/ndarray-base-count-truthy';\nimport spreadDimensions from '@stdlib/ndarray-base-spread-dimensions';\nimport indicesComplement from '@stdlib/array-base-indices-complement';\nimport getShape from '@stdlib/ndarray-shape'; // note: non-base accessor is intentional due to the input array originating in userland\nimport getOrder from '@stdlib/ndarray-base-order';\nimport empty from '@stdlib/ndarray-empty';\nimport defaults from '@stdlib/ndarray-defaults';\nimport takeIndexed from '@stdlib/array-base-take-indexed';\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport objectAssign from '@stdlib/object-assign';\nimport format from '@stdlib/error-tools-fmtprodmsg';\nimport DEFAULTS from './defaults.json';\nimport validate from './validate.js';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' );\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements along one or more ndarray dimensions.\n*\n* @param {ndarray} x - input ndarray\n* @param {Options} [options] - function options\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} options argument must be an object\n* @throws {RangeError} dimension indices must not exceed input ndarray bounds\n* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions\n* @throws {Error} must provide valid options\n* @returns {ndarray} output ndarray\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var sh = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );\n*\n* // Perform reduction:\n* var out = countTruthy( x );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\nfunction countTruthy( x, options ) {\n\tvar opts;\n\tvar err;\n\tvar idx;\n\tvar shx;\n\tvar shy;\n\tvar N;\n\tvar y;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'null5t', x ) );\n\t}\n\tshx = getShape( x );\n\tN = shx.length;\n\n\topts = objectAssign( {}, DEFAULTS );\n\tif ( arguments.length > 1 ) {\n\t\terr = validate( opts, N, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\t// When a list of dimensions is not provided, reduce the entire input array across all dimensions...\n\tif ( opts.dims === null ) {\n\t\topts.dims = zeroTo( N );\n\t}\n\t// Resolve the list of non-reduced dimensions:\n\tidx = indicesComplement( N, opts.dims );\n\n\t// Resolve the output array shape:\n\tshy = takeIndexed( shx, idx );\n\n\t// Initialize an output array whose shape matches that of the non-reduced dimensions and which has the same memory layout as the input array:\n\ty = empty( shy, {\n\t\t'dtype': DEFAULT_DTYPE,\n\t\t'order': getOrder( x )\n\t});\n\n\t// Perform the reduction:\n\tunaryReduceSubarray( base, [ x, y ], opts.dims );\n\n\t// Check whether we need to reinsert singleton dimensions which can be useful for broadcasting the returned output array to the shape of the original input array...\n\tif ( opts.keepdims ) {\n\t\ty = spreadDimensions( N, y, idx );\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default countTruthy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x ) {\n\tvar out;\n\tvar sh;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\t// Copy the shape in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < sh.length; i++ ) {\n\t\td = sh[ i ];\n\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default shape;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Count the number of truthy elements along one or more ndarray dimensions.\n*\n* @module @stdlib/ndarray-count-truthy\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n* import countTruthy from '@stdlib/ndarray-count-truthy';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var sh = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );\n*\n* // Perform reduction:\n* var out = countTruthy( x );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n* import empty from '@stdlib/ndarray-empty';\n* import countTruthy from '@stdlib/ndarray-count-truthy';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );\n*\n* // Create an output ndarray:\n* var y = empty( [], {\n* 'dtype': 'int32'\n* });\n*\n* // Perform reduction:\n* var out = countTruthy.assign( x, y );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n\n// exports: { \"assign\": \"main.assign\" }\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isndarrayLike from '@stdlib/assert-is-ndarray-like';\nimport unaryReduceSubarray from '@stdlib/ndarray-base-unary-reduce-subarray';\nimport ndims from '@stdlib/ndarray-ndims';\nimport base from '@stdlib/ndarray-base-count-truthy';\nimport objectAssign from '@stdlib/object-assign';\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport format from '@stdlib/error-tools-fmtprodmsg';\nimport defaults from './defaults.json';\nimport validate from './validate.js';\n\n\n// MAIN //\n\n/**\n* Counts the number of truthy elements along one or more ndarray dimensions and assigns the results to a provided output ndarray.\n*\n* @param {ndarray} x - input ndarray\n* @param {ndarray} y - output ndarray\n* @param {Options} [options] - function options\n* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} second argument must be an ndarray-like object\n* @throws {TypeError} options argument must be an object\n* @throws {Error} must provide valid options\n* @returns {ndarray} output ndarray\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n* import empty from '@stdlib/ndarray-empty';\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* // Define the shape of the input array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create an input ndarray:\n* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );\n*\n* // Create an output ndarray:\n* var y = empty( [], {\n* 'dtype': 'int32'\n* });\n*\n* // Perform reduction:\n* var out = assign( x, y );\n* // returns \n*\n* var v = out.get();\n* // returns 5\n*/\nfunction assign( x, y, options ) {\n\tvar opts;\n\tvar err;\n\tvar N;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'null5t', x ) );\n\t}\n\tif ( !isndarrayLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an ndarray-like object. Value: `%s`.', y ) );\n\t}\n\tN = ndims( x );\n\n\topts = objectAssign( {}, defaults );\n\tif ( arguments.length > 2 ) {\n\t\terr = validate( opts, N, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tif ( opts.dims === null ) {\n\t\topts.dims = zeroTo( N );\n\t}\n\tunaryReduceSubarray( base, [ x, y ], opts.dims ); // note: we assume that this lower-level function handles further validation of the output ndarray (e.g., expected shape, etc)\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the number of ndarray dimensions.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} number of dimensions\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\nfunction ndims( x ) {\n\tvar sh;\n\tvar n;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.ndims;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\treturn sh.length;\n}\n\n\n// EXPORTS //\n\nexport default ndims;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isArray","Array","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","isBoolean","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","Bool","Boolean","test","isPrimitive","isObject","setReadOnly","self","window","global","globalThis","getGlobal","codegen","Function","GlobalThis","Self","Win","Global","setNonEnumerableReadOnlyAccessor","getter","bytesPerElement","dtype","BYTES_PER_ELEMENT","iterationOrder","strides","cnt","x","strides2order","column","ndims","row","s1","s2","isColumnMajorContiguous","order","contiguous","isRowMajorContiguous","minmaxViewBufferIndex","shape","offset","min","max","s","real","z","re","imag","im","isString","valueOf","RE_CHARS","root","nodeList","document","childNodes","typedarray","Int8Array","reFunctionName","RE_FUNCTION_NAME","REGEXP","main$g","isObjectLike","isObjectLikeArray","predicate","len","arrayfun","isBuffer","_isBuffer","constructor","constructorName","name","ctor","ctorName","type","isFunction","typeOf","RegExp","isRegExp","search","newval","rescape","CTORS","int8","uint8","uint8c","int16","uint16","int32","uint32","float32","float64","generic","binary","complex64","complex128","hasUint8Array","Uint8Array","isUint8Array","bool","arr","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","Uint8Array$1","hasUint16Array","Uint16Array","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","uint16view","Uint16Array$1","ctors","IS_LITTLE_ENDIAN","buffer","hasArrayBuffer","ArrayBuffer","isArrayBuffer","hasFloat64Array","Float64Array","GlobalFloat64Array","NaN","hasFloat64ArraySupport","Float64Array$1","view","buf","GlobalArrayBuffer","isView","byteLength","hasArrayBufferSupport","ArrayBuffer$1","hasDataView","DataView","GlobalDataView","getFloat64","setFloat64","byteOffset","hasDataViewSupport","DataView$1","BigInteger","BigInt","RE_SUFFIX","dtypes","kind","DTYPES","all","enumeration","int64","uint64","notype","userdefined_type","keys","isArguments","bool$8","detect","hasArgumentsClass","main$9","Number","isNan","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","PINF","NINF","isInt","isEnumerableProperty","propertyIsEnumerable","hasStringEnumBug","isEnum","UINT32_MAX","isArguments$1","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","searchElement","fromIndex","isConstructorPrototype","w","hasAutomationEqualityBug","k","win","EXCLUDED_KEYS","check","HAS_BUILTIN","skipConstructor","skipPrototype","isFcn","p","HAS_ENUM_PROTO_BUG","HAS_NON_ENUM_PROPS_BUG","HAS_WINDOW","error","NON_ENUMERABLE","main$8","target","source","objectKeys","assign","orders","ORDERS","enumerated","DATA","LAYOUTS","modes","MODES","throw","clamp","wrap","normalize","LOW_MASK","TWO_32","BYTES","VIEW","float64ToInt64Bytes","stride","hi","lo","setUint32","bytes","ndarray","nbytes","ord","this","_byteLength","_bytesPerElement","_buffer","_dtype","_length","_ndims","_offset","_order","_shape","_strides","_accessors","_iterationOrder","isContiguous","_flags","ROW_MAJOR_CONTIGUOUS","COLUMN_MAJOR_CONTIGUOUS","READONLY","__meta_dataview__","isndarrayLike","data","copyFlags","idx","ind","dt","iget","join","flgs","sh","st","sm","m","o","N","M","_mode","_submode","setInt8","setInt16","setBigInt64","setInt32","TYPE","isAccessorArray","GETTERS","default","SETTERS","setter","numel","copy","copyIndexed","shape2strides","columnmajor","rowmajor","ROW_MAJOR","strides2offset","COLUMN_MAJOR","ndarraylike2object","xbuf","getData","getShape","getDType","ref","getStrides","getOffset","getOrder","accessorProtocol","accessors","accessorGetter","accessorSetter","normalizeIndex","toUniqueNormalizedIndices","indices","hash","indicesComplement","take2","y","o1","o2","ctor2dtypes","Float32Array","Int16Array","Int32Array","Uint32Array","Uint8ClampedArray","Complex64Array","Complex128Array","hasFloat32Array","GlobalFloat32Array","hasFloat32ArraySupport","Float32Array$1","hasUint32Array","GlobalUint32Array","hasUint32ArraySupport","Uint32Array$1","hasInt32Array","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","Int32Array$1","hasInt16Array","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","Int16Array$1","hasUint8ClampedArray","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","Uint8ClampedArray$1","hasInt8Array","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","Int8Array$1","isNonNegativeInteger","MAX_ARRAY_LENGTH","isArrayLikeObject","Complex128","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","realf","imagf","reinterpret","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","isComplexArrayConstructor","getComplex64","nargs","fromArray","RangeError","reinterpret64","reinterpret128","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","fromIteratorMap","start","copyWithin","iter","entries","end","fcn","separator","sep","outbuf","reducer","initialValue","acc","sbuf","outlen","begin","index","getComplex128","NTYPES","ctor2dtype","arraylike2object","isUndefinedOrNull","method","hasMethod","indexed","zeroTo","complex","take","loopOrder","sx","sy","avx","ix","iy","jx","jy","vx","vy","ux","sort2ins","defaults","BLOCK_SIZE_IN_BYTES","BLOCK_SIZE_IN_ELEMENTS","unaryBlockSize","dtypeX","dtypeY","nbx","nby","filled","incrementOffsets","offsets","inc","setViewOffsets","views","arrays","numeric","floating_point","real_floating_point","complex_floating_point","boolean","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","gzeros","table","BooleanArray","isBooleanArray","isBooleanArrayConstructor","compareFcn","sort","a","b","factory","isComplexFloatingPointDataType","contains","isBooleanDataType","io","xo","oo","isComplexDataType","so","reinterpretBoolean","xdata","odata","xget","oset","without","vind2bind","mode","MODE","UNARY","opts","ybuf","dv0","S0","iv","i0","isRowMajor","dv1","S1","sv","i1","dv2","S2","i2","dv3","S3","i3","dv4","S4","i4","dv5","S5","i5","dv6","S6","i6","dv7","S7","i7","dv8","S8","i8","dv9","S9","i9","ACCESSOR_UNARY","BLOCKED_UNARY","bsize","ov1","s0","ov","j0","j1","takeIndexed","blockSize","ov2","j2","ov3","s3","j3","ov4","s4","j4","ov5","s5","j5","ov6","s6","j6","ov7","s7","j7","ov8","s8","j8","ov9","s9","j9","BLOCKED_ACCESSOR_UNARY","MAX_DIMS","unaryReduceSubarray","dims","options","ldims","shx","shc","shl","iox","ioy","sc","sl","ns","d","K","ndarray2object","normalizeIndices","takeIndexed2","initializeViews","accessorunarynd","unarynd","reduce","C64_BYTES_PER_ELEMENT","C128_BYTES_PER_ELEMENT","gscal","alpha","nullaryBlockSize","COUNT","count","dx0","dx1","dx2","dx3","dx4","dx5","dx6","dx7","dx8","dx9","ACCESSOR_COUNT","COMPLEX_COUNT","BLOCKED_COUNT","ox1","ox","ox2","ox3","ox4","ox5","ox6","ox7","ox8","ox9","BLOCKED_ACCESSOR_COUNT","BLOCKED_COMPLEX_COUNT","countTruthy","isCmplx","xmmv","reinterpretComplex","ordx","accessorcountnd","complexcountnd","countnd","getOwnPropertySymbols","Obj","propertySymbols","enumerableProperties","isEnumerable","hasObjectAssign","key","to","objectAssign","isSortedAscending","v1","v2","spreadDimensions","isrm","S","toNormalizedIndices","ones","readonly","getProto","getPrototypeOf","proto","getProto$1","objectPrototype","isPlainObject","isPrototypeOf","ownProps","isArrayLike","Buffer","require$$0","GlobalBuffer","from","hasNodeBufferSupport","Buffer$1","allocUnsafe$1","allocUnsafe","size","empty","nb","emptyArray","arraylikefcn","isPrimitiveArray","isObjectArray","isNonNegativeIntegerArray","isIntegerArray","isDataType","casting","index_mode","validate","create","Ctor","createObject$1","clampIndex","wrapIndex","mp1","isIndexMode","TABLE","parent","iset","INDEX_MODE","isOrder","minmax","isBufferLengthCompatible","submode","superCtor","createObject","inherit","getIndex","DTYPE","ORDER","fmtprodmsg","u","encodeURIComponent","keepdims"],"mappings":";qRAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,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0K,EAAKuE,MAGrCvE,EAAK2M,WACTrX,EAAIyT,GAAkBnW,EAAG0C,EAAGrD,IAEtBqD,CACR,QErCArS,EAAa5I,GAAM,UCfnB,SAAiBgK,EAAGiR,EAAGkP,GACtB,IAAIxE,EACArf,EACAiS,EAEJ,IAAMd,GAAezN,GACpB,MAAM,IAAIzF,UAAWgB,GAAQ,SAAUyE,IAExC,IAAMyN,GAAewD,GACpB,MAAM,IAAI1W,UAAWgB,GAAQ,iFAAkF0V,IAKhH,GAHA1C,ECjDD,SAAgBvO,GACf,IAAIkO,EACA5X,EAGJ,GAAkB,iBAAN0J,GAAwB,OAANA,EAC7B,MAAM,IAAIzF,UAAWgB,EAAQ,0DAA2DyE,IAGzF,GAAKuT,GADLjd,EAAI0J,EAAEG,OAEL,OAAO7J,EAGR,IAAM+S,GADN6E,EAAKlO,EAAEY,OAEN,MAAM,IAAIrG,UAAWgB,EAAQ,0DAA2DyE,IAEzF,OAAOkO,EAAGnX,MACX,CDgCKoJ,CAAOH,GAEX2b,EAAO2I,GAAc,GAAIjM,IACpB3d,UAAU3D,OAAS,IACvBuF,EAAMuqB,GAAUlL,EAAMpN,EAAG4R,IAExB,MAAM7jB,EAOR,OAJmB,OAAdqf,EAAKuE,OACTvE,EAAKuE,KAAO5I,GAAQ/I,IAErB0R,GAAqBvoB,GAAM,CAAEsI,EAAGiR,GAAK0K,EAAKuE,MACnCjP,CACR","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,541,543,546]} \ No newline at end of file diff --git a/lib/assign.js b/lib/assign.js deleted file mode 100644 index 776be83..0000000 --- a/lib/assign.js +++ /dev/null @@ -1,111 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2025 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 isndarrayLike = require( '@stdlib/assert-is-ndarray-like' ); -var unaryReduceSubarray = require( '@stdlib/ndarray-base-unary-reduce-subarray' ); -var ndims = require( '@stdlib/ndarray-ndims' ); -var base = require( '@stdlib/ndarray-base-count-truthy' ); -var objectAssign = require( '@stdlib/object-assign' ); -var zeroTo = require( '@stdlib/array-base-zero-to' ); -var format = require( '@stdlib/string-format' ); -var defaults = require( './defaults.json' ); -var validate = require( './validate.js' ); - - -// MAIN // - -/** -* Counts the number of truthy elements along one or more ndarray dimensions and assigns the results to a provided output ndarray. -* -* @param {ndarray} x - input ndarray -* @param {ndarray} y - output ndarray -* @param {Options} [options] - function options -* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction -* @throws {TypeError} first argument must be an ndarray-like object -* @throws {TypeError} second argument must be an ndarray-like object -* @throws {TypeError} options argument must be an object -* @throws {Error} must provide valid options -* @returns {ndarray} output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var empty = require( '@stdlib/ndarray-empty' ); -* -* // Create a data buffer: -* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* -* // Define the shape of the input array: -* var shape = [ 3, 1, 2 ]; -* -* // Define the array strides: -* var sx = [ 4, 4, 1 ]; -* -* // Define the index offset: -* var ox = 1; -* -* // Create an input ndarray: -* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' ); -* -* // Create an output ndarray: -* var y = empty( [], { -* 'dtype': 'int32' -* }); -* -* // Perform reduction: -* var out = assign( x, y ); -* // returns -* -* var v = out.get(); -* // returns 5 -*/ -function assign( x, y, options ) { - var opts; - var err; - var N; - - if ( !isndarrayLike( x ) ) { - throw new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) ); - } - if ( !isndarrayLike( y ) ) { - throw new TypeError( format( 'invalid argument. Second argument must be an ndarray-like object. Value: `%s`.', y ) ); - } - N = ndims( x ); - - opts = objectAssign( {}, defaults ); - if ( arguments.length > 2 ) { - err = validate( opts, N, options ); - if ( err ) { - throw err; - } - } - if ( opts.dims === null ) { - opts.dims = zeroTo( N ); - } - unaryReduceSubarray( base, [ x, y ], opts.dims ); // note: we assume that this lower-level function handles further validation of the output ndarray (e.g., expected shape, etc) - return y; -} - - -// EXPORTS // - -module.exports = assign; diff --git a/lib/defaults.json b/lib/defaults.json deleted file mode 100644 index 08433b3..0000000 --- a/lib/defaults.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "dims": null, - "keepdims": false -} diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 3d37fa7..0000000 --- a/lib/index.js +++ /dev/null @@ -1,103 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2025 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'; - -/** -* Count the number of truthy elements along one or more ndarray dimensions. -* -* @module @stdlib/ndarray-count-truthy -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var countTruthy = require( '@stdlib/ndarray-count-truthy' ); -* -* // Create a data buffer: -* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* -* // Define the shape of the input array: -* var sh = [ 3, 1, 2 ]; -* -* // Define the array strides: -* var sx = [ 4, 4, 1 ]; -* -* // Define the index offset: -* var ox = 1; -* -* // Create an input ndarray: -* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' ); -* -* // Perform reduction: -* var out = countTruthy( x ); -* // returns -* -* var v = out.get(); -* // returns 5 -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var empty = require( '@stdlib/ndarray-empty' ); -* var countTruthy = require( '@stdlib/ndarray-count-truthy' ); -* -* // Create a data buffer: -* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* -* // Define the shape of the input array: -* var shape = [ 3, 1, 2 ]; -* -* // Define the array strides: -* var sx = [ 4, 4, 1 ]; -* -* // Define the index offset: -* var ox = 1; -* -* // Create an input ndarray: -* var x = new ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' ); -* -* // Create an output ndarray: -* var y = empty( [], { -* 'dtype': 'int32' -* }); -* -* // Perform reduction: -* var out = countTruthy.assign( x, y ); -* // returns -* -* var v = out.get(); -* // returns 5 -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' ); -var main = require( './main.js' ); -var assign = require( './assign.js' ); - - -// MAIN // - -setReadOnly( main, 'assign', assign ); - - -// EXPORTS // - -module.exports = main; - -// exports: { "assign": "main.assign" } diff --git a/lib/main.js b/lib/main.js deleted file mode 100644 index 813c18b..0000000 --- a/lib/main.js +++ /dev/null @@ -1,138 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2025 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 isndarrayLike = require( '@stdlib/assert-is-ndarray-like' ); -var unaryReduceSubarray = require( '@stdlib/ndarray-base-unary-reduce-subarray' ); -var base = require( '@stdlib/ndarray-base-count-truthy' ); -var spreadDimensions = require( '@stdlib/ndarray-base-spread-dimensions' ); -var indicesComplement = require( '@stdlib/array-base-indices-complement' ); -var getShape = require( '@stdlib/ndarray-shape' ); // note: non-base accessor is intentional due to the input array originating in userland -var getOrder = require( '@stdlib/ndarray-base-order' ); -var empty = require( '@stdlib/ndarray-empty' ); -var defaults = require( '@stdlib/ndarray-defaults' ); -var takeIndexed = require( '@stdlib/array-base-take-indexed' ); -var zeroTo = require( '@stdlib/array-base-zero-to' ); -var objectAssign = require( '@stdlib/object-assign' ); -var format = require( '@stdlib/string-format' ); -var DEFAULTS = require( './defaults.json' ); -var validate = require( './validate.js' ); - - -// VARIABLES // - -var DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' ); - - -// MAIN // - -/** -* Counts the number of truthy elements along one or more ndarray dimensions. -* -* @param {ndarray} x - input ndarray -* @param {Options} [options] - function options -* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction -* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions -* @throws {TypeError} first argument must be an ndarray-like object -* @throws {TypeError} options argument must be an object -* @throws {RangeError} dimension indices must not exceed input ndarray bounds -* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions -* @throws {Error} must provide valid options -* @returns {ndarray} output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* -* // Create a data buffer: -* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* -* // Define the shape of the input array: -* var sh = [ 3, 1, 2 ]; -* -* // Define the array strides: -* var sx = [ 4, 4, 1 ]; -* -* // Define the index offset: -* var ox = 1; -* -* // Create an input ndarray: -* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' ); -* -* // Perform reduction: -* var out = countTruthy( x ); -* // returns -* -* var v = out.get(); -* // returns 5 -*/ -function countTruthy( x, options ) { - var opts; - var err; - var idx; - var shx; - var shy; - var N; - var y; - - if ( !isndarrayLike( x ) ) { - throw new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) ); - } - shx = getShape( x ); - N = shx.length; - - opts = objectAssign( {}, DEFAULTS ); - if ( arguments.length > 1 ) { - err = validate( opts, N, options ); - if ( err ) { - throw err; - } - } - // When a list of dimensions is not provided, reduce the entire input array across all dimensions... - if ( opts.dims === null ) { - opts.dims = zeroTo( N ); - } - // Resolve the list of non-reduced dimensions: - idx = indicesComplement( N, opts.dims ); - - // Resolve the output array shape: - shy = takeIndexed( shx, idx ); - - // Initialize an output array whose shape matches that of the non-reduced dimensions and which has the same memory layout as the input array: - y = empty( shy, { - 'dtype': DEFAULT_DTYPE, - 'order': getOrder( x ) - }); - - // Perform the reduction: - unaryReduceSubarray( base, [ x, y ], opts.dims ); - - // Check whether we need to reinsert singleton dimensions which can be useful for broadcasting the returned output array to the shape of the original input array... - if ( opts.keepdims ) { - y = spreadDimensions( N, y, idx ); - } - return y; -} - - -// EXPORTS // - -module.exports = countTruthy; diff --git a/lib/validate.js b/lib/validate.js deleted file mode 100644 index 4bdff92..0000000 --- a/lib/validate.js +++ /dev/null @@ -1,90 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2025 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 isObject = require( '@stdlib/assert-is-plain-object' ); -var hasOwnProp = require( '@stdlib/assert-has-own-property' ); -var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive; -var isIntegerArray = require( '@stdlib/assert-is-integer-array' ).primitives; -var isEmptyCollection = require( '@stdlib/assert-is-empty-collection' ); -var normalizeIndices = require( '@stdlib/ndarray-base-to-unique-normalized-indices' ); -var join = require( '@stdlib/array-base-join' ); -var format = require( '@stdlib/string-format' ); - - -// MAIN // - -/** -* Validates function options. -* -* @private -* @param {Object} opts - destination object -* @param {NonNegativeInteger} ndims - number of input ndarray dimensions -* @param {Options} options - function options -* @param {boolean} [options.keepdims] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions -* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction -* @returns {(Error|null)} null or an error object -* -* @example -* var opts = {}; -* var options = { -* 'keepdims': true -* }; -* var err = validate( opts, 3, options ); -* if ( err ) { -* throw err; -* } -*/ -function validate( opts, ndims, options ) { - var tmp; - if ( !isObject( options ) ) { - return new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); - } - if ( hasOwnProp( options, 'keepdims' ) ) { - opts.keepdims = options.keepdims; - if ( !isBoolean( opts.keepdims ) ) { - return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'keepdims', opts.keepdims ) ); - } - } - if ( hasOwnProp( options, 'dims' ) ) { - opts.dims = options.dims; - if ( !isIntegerArray( opts.dims ) && !isEmptyCollection( opts.dims ) ) { - return new TypeError( format( 'invalid option. `%s` option must be an array of integers. Option: `%s`.', 'dims', opts.dims ) ); - } - tmp = normalizeIndices( opts.dims, ndims-1 ); - if ( tmp === null ) { - return new RangeError( format( 'invalid option. `%s` option contains an out-of-bounds dimension index. Option: [%s].', 'dims', join( opts.dims, ',' ) ) ); - } - if ( tmp.length !== opts.dims.length ) { - return new Error( format( 'invalid option. `%s` option contains duplicate indices. Option: [%s].', 'dims', join( opts.dims, ',' ) ) ); - } - if ( tmp.length > ndims ) { - return new RangeError( format( 'invalid option. `%s` option specifies more dimensions than exists in the input array. Number of dimensions: %d. Option: [%s].', ndims, join( opts.dims, ',' ) ) ); - } - opts.dims = tmp; - } - return null; -} - - -// EXPORTS // - -module.exports = validate; diff --git a/package.json b/package.json index 0855355..b964000 100644 --- a/package.json +++ b/package.json @@ -3,31 +3,7 @@ "version": "0.0.0", "description": "Count the number of truthy elements along one or more ndarray dimensions.", "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", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "main": "./index.js", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -36,64 +12,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/array-base-indices-complement": "github:stdlib-js/array-base-indices-complement#main", - "@stdlib/array-base-join": "^0.1.1", - "@stdlib/array-base-take-indexed": "^0.2.2", - "@stdlib/array-base-zero-to": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-empty-collection": "^0.2.2", - "@stdlib/assert-is-integer-array": "^0.2.2", - "@stdlib/assert-is-ndarray-like": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/ndarray-base-count-truthy": "github:stdlib-js/ndarray-base-count-truthy#main", - "@stdlib/ndarray-base-order": "^0.2.2", - "@stdlib/ndarray-base-spread-dimensions": "github:stdlib-js/ndarray-base-spread-dimensions#main", - "@stdlib/ndarray-base-to-unique-normalized-indices": "github:stdlib-js/ndarray-base-to-unique-normalized-indices#main", - "@stdlib/ndarray-base-unary-reduce-subarray": "github:stdlib-js/ndarray-base-unary-reduce-subarray#main", - "@stdlib/ndarray-defaults": "^0.3.0", - "@stdlib/ndarray-empty": "^0.3.0", - "@stdlib/ndarray-ndims": "^0.2.2", - "@stdlib/ndarray-shape": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/string-format": "^0.2.2", - "@stdlib/types": "^0.4.3", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/assert-is-method": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/math-base-special-sqrt": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-ctor": "^0.2.2", - "@stdlib/ndarray-fill-by": "github:stdlib-js/ndarray-fill-by#main", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/ndarray-zeros": "^0.3.0", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/random-base-bernoulli": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "strided", @@ -106,7 +24,6 @@ "reduce", "reduction" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats_browser.html b/stats_browser.html new file mode 100644 index 0000000..4f356f4 --- /dev/null +++ b/stats_browser.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/stats_node.html b/stats_node.html new file mode 100644 index 0000000..d5a2ae1 --- /dev/null +++ b/stats_node.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2023 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 main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 84a3d2d..0000000 --- a/test/test.js +++ /dev/null @@ -1,39 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2025 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 isMethod = require( '@stdlib/assert-is-method' ); -var countTruthy = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof countTruthy, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'attached to the main export is an `assign` method', function test( t ) { - t.strictEqual( isMethod( countTruthy, 'assign' ), true, 'returns expected value' ); - t.end(); -});