Thread::tdlen
Details
-
- This message is generated when a threading operation is used with expressions that do not have the same length.
- Operations with the Listable attribute, such as Plus and Times, automatically thread over arguments that are lists.
- Off[message] switches off the message; On[message] switches it on. For example: Off[Thread::tdlen].
Examples
Basic Examples (2)
An error occurs because the argument expressions in the test function do not have the same length:
Thread[test[{1, 2}, {7, 8, 9}]]This shows a valid argument in Thread:
Thread[test[{1, 2, 3}, {7, 8, 9}]]This message can also be generated when functions with the Listable attribute are used with list arguments that do not all have the same length:
Attributes[Plus]10 + {1, 2} + {7, 8, 9}This example shows addition threaded over lists that have the same length:
10 + {1, 2, 3} + {7, 8, 9}