#### stdlib_ndarray_{{SIGNATURE}}( \*arrays[], \*fcn )

Applies a nullary callback and assigns results to elements in an output ndarray.

```c
#include "stdlib/ndarray/dtypes.h"
#include "stdlib/ndarray/index_modes.h"
#include "stdlib/ndarray/orders.h"
#include "stdlib/ndarray/ctor.h"{{EXAMPLE_INCLUDES}}
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>

// Define the ndarray data type:
enum STDLIB_NDARRAY_DTYPE xdtype = STDLIB_NDARRAY_{{OUTPUT_NDARRAY_DTYPE_UPPER}};

// Create an underlying byte array:
uint8_t xbuf[] = { {{OUTPUT_NDARRAY_BYTES_2D}} };

// Define the number of dimensions:
int64_t ndims = 2;

// Define the array shape:
int64_t shape[] = { {{NDARRAY_SHAPE_2D}} };

// Define the strides:
int64_t sx[] = { {{OUTPUT_NDARRAY_STRIDES_2D}} };

// Define the index offset:
int64_t ox = 0;

// Define the array order:
enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR;

// Specify the index mode:
enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR;

// Specify the subscript index modes:
int8_t submodes[] = { imode };
int64_t nsubmodes = 1;

// Create an output ndarray:
struct ndarray *x = stdlib_ndarray_allocate( xdtype, xbuf, ndims, shape, sx, ox, order, imode, nsubmodes, submodes );
if ( x == NULL ) {
    fprintf( stderr, "Error allocating memory.\n" );
    exit( EXIT_FAILURE );
}

// Create an array containing a pointer to the ndarray:
struct ndarray *arrays[] = { x };

// Define a callback:
static {{CALLBACK_RETURN_DTYPE}} fcn( void ) {
    {{CALLBACK_BODY}}
}

// Apply the callback:
int8_t status = stdlib_ndarray_{{SIGNATURE}}( arrays, (void *)fcn );
if ( status != 0 ) {
    fprintf( stderr, "Error during computation.\n" );
    exit( EXIT_FAILURE );
}

// ...

// Free allocated memory:
stdlib_ndarray_free( x );
```

The function accepts the following arguments:

-   **arrays**: `[inout] struct ndarray**` array whose only element is a pointer to an output ndarray.
-   **fcn**: `[in] void*` a `{{CALLBACK_RETURN_DTYPE}} (*f)()` function to apply provided as a `void` pointer.

```c
int8_t stdlib_ndarray_{{SIGNATURE}}( struct ndarray *arrays[], void *fcn );
```
