This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / stats / _axis_nan_policy / _broadcast_array_shapes_remove_axis

function

scipy.stats._axis_nan_policy:_broadcast_array_shapes_remove_axis

source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_axis_nan_policy.py:127

Signature

def _broadcast_array_shapes_remove_axis(arrays, axis = None)

Summary

Broadcast shapes of arrays, dropping specified axes

Extended Summary

Given a sequence of arrays arrays and an integer or tuple axis, find the shape of the broadcast result after consuming/dropping axis. In other words, return output shape of a typical hypothesis test on arrays vectorized along axis.

Examples

import numpy as np
from scipy.stats._axis_nan_policy import _broadcast_array_shapes_remove_axis
a = np.zeros((5, 2, 1))
b = np.zeros((9, 3))
✓
_broadcast_array_shapes_remove_axis((a, b), 1)
✗
(np.int64(5), np.int64(3))

Aliases

  • scipy.stats._axis_nan_policy._broadcast_array_shapes_remove_axis