<!--

@license Apache-2.0

Copyright (c) 2026 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.

-->

# Base

> Base ndarray BLAS functions.

<section class="usage">

## Usage

```javascript
var ns = require( '@stdlib/blas/base/ndarray' );
```

#### ns

Namespace containing base ndarray BLAS functions.

```javascript
var o = ns;
// returns {...}
```

The namespace exposes the following APIs:

<!-- <toc pattern="*"> -->

<div class="namespace-toc">

-   <span class="signature">[`caxpy( arrays )`][@stdlib/blas/base/ndarray/caxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision complex floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional single-precision complex floating-point ndarray `y`.</span>
-   <span class="signature">[`ccopy( arrays )`][@stdlib/blas/base/ndarray/ccopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional single-precision complex floating-point ndarray `x` into a one-dimensional single-precision complex floating-point ndarray `y`.</span>
-   <span class="signature">[`cscal( arrays )`][@stdlib/blas/base/ndarray/cscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision complex floating-point ndarray by a scalar constant.</span>
-   <span class="signature">[`csscal( arrays )`][@stdlib/blas/base/ndarray/csscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision complex floating-point ndarray by a single-precision floating-point scalar constant.</span>
-   <span class="signature">[`cswap( arrays )`][@stdlib/blas/base/ndarray/cswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional single-precision complex floating-point ndarrays.</span>
-   <span class="signature">[`dasum( arrays )`][@stdlib/blas/base/ndarray/dasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional double-precision floating-point ndarray.</span>
-   <span class="signature">[`daxpy( arrays )`][@stdlib/blas/base/ndarray/daxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional double-precision floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional double-precision floating-point ndarray `y`.</span>
-   <span class="signature">[`dcopy( arrays )`][@stdlib/blas/base/ndarray/dcopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional double-precision floating-point ndarray `x` into a one-dimensional double-precision floating-point ndarray `y`.</span>
-   <span class="signature">[`ddot( arrays )`][@stdlib/blas/base/ndarray/ddot]</span><span class="delimiter">: </span><span class="description">calculate the dot product of two one-dimensional double-precision floating-point ndarrays.</span>
-   <span class="signature">[`dnrm2( arrays )`][@stdlib/blas/base/ndarray/dnrm2]</span><span class="delimiter">: </span><span class="description">compute the L2-norm of a one-dimensional double-precision floating-point ndarray.</span>
-   <span class="signature">[`dscal( arrays )`][@stdlib/blas/base/ndarray/dscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional double-precision floating-point ndarray by a scalar constant.</span>
-   <span class="signature">[`dsdot( arrays )`][@stdlib/blas/base/ndarray/dsdot]</span><span class="delimiter">: </span><span class="description">calculate the dot product of two one-dimensional single-precision floating-point ndarrays with double-precision accumulation.</span>
-   <span class="signature">[`dswap( arrays )`][@stdlib/blas/base/ndarray/dswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional double-precision floating-point ndarrays.</span>
-   <span class="signature">[`dzasum( arrays )`][@stdlib/blas/base/ndarray/dzasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional double-precision complex floating-point ndarray.</span>
-   <span class="signature">[`dznrm2( arrays )`][@stdlib/blas/base/ndarray/dznrm2]</span><span class="delimiter">: </span><span class="description">compute the L2-norm of a one-dimensional double-precision complex floating-point ndarray.</span>
-   <span class="signature">[`gasum( arrays )`][@stdlib/blas/base/ndarray/gasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional ndarray.</span>
-   <span class="signature">[`gaxpy( arrays )`][@stdlib/blas/base/ndarray/gaxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional ndarray `x` by a constant `alpha` and add the result to a one-dimensional ndarray `y`.</span>
-   <span class="signature">[`gcopy( arrays )`][@stdlib/blas/base/ndarray/gcopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional ndarray `x` into a one-dimensional ndarray `y`.</span>
-   <span class="signature">[`gdot( arrays )`][@stdlib/blas/base/ndarray/gdot]</span><span class="delimiter">: </span><span class="description">calculate the dot product of two one-dimensional ndarrays.</span>
-   <span class="signature">[`gnrm2( arrays )`][@stdlib/blas/base/ndarray/gnrm2]</span><span class="delimiter">: </span><span class="description">compute the L2-norm of a one-dimensional ndarray.</span>
-   <span class="signature">[`gscal( arrays )`][@stdlib/blas/base/ndarray/gscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional ndarray by a scalar constant.</span>
-   <span class="signature">[`gswap( arrays )`][@stdlib/blas/base/ndarray/gswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional ndarrays.</span>
-   <span class="signature">[`idamax( arrays )`][@stdlib/blas/base/ndarray/idamax]</span><span class="delimiter">: </span><span class="description">find the index of the first element having the maximum absolute value for all elements in a one-dimensional double-precision floating-point ndarray.</span>
-   <span class="signature">[`igamax( arrays )`][@stdlib/blas/base/ndarray/igamax]</span><span class="delimiter">: </span><span class="description">find the index of the first element having the maximum absolute value for all elements in a one-dimensional ndarray.</span>
-   <span class="signature">[`isamax( arrays )`][@stdlib/blas/base/ndarray/isamax]</span><span class="delimiter">: </span><span class="description">find the index of the first element having the maximum absolute value for all elements in a one-dimensional single-precision floating-point ndarray.</span>
-   <span class="signature">[`sasum( arrays )`][@stdlib/blas/base/ndarray/sasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional single-precision floating-point ndarray.</span>
-   <span class="signature">[`saxpy( arrays )`][@stdlib/blas/base/ndarray/saxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional single-precision floating-point ndarray `y`.</span>
-   <span class="signature">[`scasum( arrays )`][@stdlib/blas/base/ndarray/scasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional single-precision complex floating-point ndarray.</span>
-   <span class="signature">[`scnrm2( arrays )`][@stdlib/blas/base/ndarray/scnrm2]</span><span class="delimiter">: </span><span class="description">compute the L2-norm of a one-dimensional single-precision complex floating-point ndarray.</span>
-   <span class="signature">[`scopy( arrays )`][@stdlib/blas/base/ndarray/scopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional single-precision floating-point ndarray `x` into a one-dimensional single-precision floating-point ndarray `y`.</span>
-   <span class="signature">[`sdot( arrays )`][@stdlib/blas/base/ndarray/sdot]</span><span class="delimiter">: </span><span class="description">calculate the dot product of two one-dimensional single-precision floating-point ndarrays.</span>
-   <span class="signature">[`sdsdot( arrays )`][@stdlib/blas/base/ndarray/sdsdot]</span><span class="delimiter">: </span><span class="description">calculate the dot product of two one-dimensional single-precision floating-point ndarrays with extended accumulation.</span>
-   <span class="signature">[`snrm2( arrays )`][@stdlib/blas/base/ndarray/snrm2]</span><span class="delimiter">: </span><span class="description">compute the L2-norm of a one-dimensional single-precision floating-point ndarray.</span>
-   <span class="signature">[`sscal( arrays )`][@stdlib/blas/base/ndarray/sscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision floating-point ndarray by a scalar constant.</span>
-   <span class="signature">[`sswap( arrays )`][@stdlib/blas/base/ndarray/sswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional single-precision floating-point ndarrays.</span>
-   <span class="signature">[`zaxpy( arrays )`][@stdlib/blas/base/ndarray/zaxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional double-precision complex floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional double-precision complex floating-point ndarray `y`.</span>
-   <span class="signature">[`zcopy( arrays )`][@stdlib/blas/base/ndarray/zcopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional double-precision complex floating-point ndarray `x` into a one-dimensional double-precision complex floating-point ndarray `y`.</span>
-   <span class="signature">[`zdscal( arrays )`][@stdlib/blas/base/ndarray/zdscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional double-precision complex floating-point ndarray by a double-precision floating-point scalar constant.</span>
-   <span class="signature">[`zscal( arrays )`][@stdlib/blas/base/ndarray/zscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional double-precision complex floating-point ndarray by a scalar constant.</span>
-   <span class="signature">[`zswap( arrays )`][@stdlib/blas/base/ndarray/zswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional double-precision complex floating-point ndarrays.</span>

</div>

<!-- </toc> -->

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- TODO: better examples -->

<!-- eslint no-undef: "error" -->

```javascript
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/blas/base/ndarray' );

console.log( objectKeys( ns ) );
```

</section>

<!-- /.examples -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

</section>

<!-- /.related -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

<!-- <toc-links> -->

[@stdlib/blas/base/ndarray/caxpy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/caxpy

[@stdlib/blas/base/ndarray/ccopy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/ccopy

[@stdlib/blas/base/ndarray/cscal]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/cscal

[@stdlib/blas/base/ndarray/csscal]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/csscal

[@stdlib/blas/base/ndarray/cswap]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/cswap

[@stdlib/blas/base/ndarray/dasum]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/dasum

[@stdlib/blas/base/ndarray/daxpy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/daxpy

[@stdlib/blas/base/ndarray/dcopy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/dcopy

[@stdlib/blas/base/ndarray/ddot]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/ddot

[@stdlib/blas/base/ndarray/dnrm2]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/dnrm2

[@stdlib/blas/base/ndarray/dscal]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/dscal

[@stdlib/blas/base/ndarray/dsdot]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/dsdot

[@stdlib/blas/base/ndarray/dswap]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/dswap

[@stdlib/blas/base/ndarray/dzasum]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/dzasum

[@stdlib/blas/base/ndarray/dznrm2]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/dznrm2

[@stdlib/blas/base/ndarray/gasum]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/gasum

[@stdlib/blas/base/ndarray/gaxpy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/gaxpy

[@stdlib/blas/base/ndarray/gcopy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/gcopy

[@stdlib/blas/base/ndarray/gdot]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/gdot

[@stdlib/blas/base/ndarray/gnrm2]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/gnrm2

[@stdlib/blas/base/ndarray/gscal]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/gscal

[@stdlib/blas/base/ndarray/gswap]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/gswap

[@stdlib/blas/base/ndarray/idamax]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/idamax

[@stdlib/blas/base/ndarray/igamax]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/igamax

[@stdlib/blas/base/ndarray/isamax]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/isamax

[@stdlib/blas/base/ndarray/sasum]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/sasum

[@stdlib/blas/base/ndarray/saxpy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/saxpy

[@stdlib/blas/base/ndarray/scasum]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/scasum

[@stdlib/blas/base/ndarray/scnrm2]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/scnrm2

[@stdlib/blas/base/ndarray/scopy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/scopy

[@stdlib/blas/base/ndarray/sdot]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/sdot

[@stdlib/blas/base/ndarray/sdsdot]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/sdsdot

[@stdlib/blas/base/ndarray/snrm2]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/snrm2

[@stdlib/blas/base/ndarray/sscal]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/sscal

[@stdlib/blas/base/ndarray/sswap]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/sswap

[@stdlib/blas/base/ndarray/zaxpy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/zaxpy

[@stdlib/blas/base/ndarray/zcopy]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/zcopy

[@stdlib/blas/base/ndarray/zdscal]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/zdscal

[@stdlib/blas/base/ndarray/zscal]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/zscal

[@stdlib/blas/base/ndarray/zswap]: https://github.com/stdlib-js/blas/tree/main/base/ndarray/zswap

<!-- </toc-links> -->

</section>

<!-- /.links -->
