Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ndarray/base/assert/is-read-only/docs/types/index.d"

Index

Functions

Functions

Export assignment isReadOnly

  • isReadOnly(arr: ndarray): boolean
  • Tests whether an ndarray is read-only.

    Parameters

    Returns boolean

    boolean indicating whether an ndarray is read-only

    Example

    var array = require( `@stdlib/ndarray/array` );
    
    var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {
        'readonly': true
    });
    var bool = isReadOnly( x );
    // returns true
    
    x = array( [ [ 1, 2 ], [ 3, 4 ] ], {
        'readonly': false
    });
    bool = isReadOnly( x );
    // returns false