numpy-ts 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,6 +54,24 @@ export declare function broadcastTo(storage: ArrayStorage, targetShape: readonly
54
54
  * @throws Error if arrays have incompatible shapes
55
55
  */
56
56
  export declare function broadcastArrays(storages: ArrayStorage[]): ArrayStorage[];
57
+ /**
58
+ * Compute the broadcast shape for multiple shapes without creating arrays.
59
+ * Returns the resulting shape if all shapes are broadcast-compatible.
60
+ *
61
+ * This is the NumPy-compatible function for computing broadcast shape.
62
+ *
63
+ * @param shapes - Variable number of shapes to broadcast
64
+ * @returns The broadcast output shape
65
+ * @throws Error if shapes are not broadcast-compatible
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * broadcastShapes([3, 4], [4]); // [3, 4]
70
+ * broadcastShapes([3, 4], [3, 1]); // [3, 4]
71
+ * broadcastShapes([3, 4], [5]); // Error
72
+ * ```
73
+ */
74
+ export declare function broadcastShapes(...shapes: readonly number[][]): number[];
57
75
  /**
58
76
  * Generate a descriptive error message for broadcasting failures
59
77
  *