NonThreadable
is an attribute that can be assigned to a symbol f to indicate that f and f[arg1,arg2,…] should not combine with other list arguments in arithmetic and many other functions that work with lists.
Details
- The NonThreadable attribute is typically used for symbols that represent nonscalar quantities.
- VectorSymbol, MatrixSymbol and ArraySymbol have the NonThreadable attribute.
- Most standard built‐in functions that produce array results have the NonThreadable attribute.
- Expressions whose heads are non-threadable objects are non-threadable.
- Expressions obtained by applying Listable functions to non-threadable objects are non-threadable.
Examples
open allclose allBasic Examples (1)
Give the NonThreadable attribute to symbol x:
Arithmetic operations do not combine x with list elements:
Expressions with non-threadable heads are non-threadable:
Expressions obtained by applying Listable functions to non-threadable objects are non-threadable:
Scope (4)
ArraySymbol has the NonThreadable attribute:
Arithmetic operations do not combine symbolic arrays with list elements:
SymbolicOnesArray has the NonThreadable attribute:
A symbolic matrix of ones is not added to matrix elements:
When the symbolic matrix is converted to an explicit matrix, the matrices are added correctly:
Inverse has the NonThreadable attribute:
Arithmetic operations do not combine expressions with head Inverse with list elements:
Dot does not have the NonThreadable attribute:
Expressions with head Dot are threadable, unless they are known to be nonscalars:
Text
Wolfram Research (2024), NonThreadable, Wolfram Language function, https://reference.wolfram.com/language/ref/NonThreadable.html.
CMS
Wolfram Language. 2024. "NonThreadable." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NonThreadable.html.
APA
Wolfram Language. (2024). NonThreadable. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NonThreadable.html