Description
Mark axes compatible when equal or either equals one.
Matrix shapes can be empty or have singleton axes without containing a scalar. Broadcasting expands singleton dimensions under an explicit axis-by-axis compatibility rule.
Mark axes compatible when equal or either equals one.
When to use this tool
Use Matrix: Matrix Broadcast Singleton Axis Check when you need a matrix shape, count, or structural entry classification.
How to use the tool and how it works
- Enter leftAxis, rightAxis. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Mark axes compatible when equal or either equals one. Return the other dimension for a singleton expansion, the common dimension when equal, or outputAxis -1 when incompatible.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| leftAxis | Left Axis | Required. Safe integer. |
| rightAxis | Right Axis | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.compatible | Compatible | Calculated result member: boolean. |
| result.outputAxis | Output Axis | Calculated result member: number. |
{
"input": {
"leftAxis": 1,
"rightAxis": 0
},
"output": {
"result": {
"compatible": true,
"outputAxis": 0
}
}
} Limitations and assumptions
- Zero dimensions are allowed and broadcasting one with zero returns zero; a full shape must be aligned and checked axis by axis.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Check all axes and actual data lengths when validating a complete matrix or broadcast operation.
References
Similar or alternative tools
- Matrix: Matrix Shape Degenerate Axis Tag
Allow zero dimensions.
- Matrix Block Border Shape Budget
Add addedRows and addedColumns to the core shape.