Conformability - OADL array conformability rules
All array-valued expressions
Only values with conformable shapes can be used together in arithmetic statements. The rules regarding conformability are simple:
Note that an Enclosure is considered to be a
scalar.
a = [1,2,3]
b = [4,5,6]
a + b
5 7 9
a + 1
2 3 4
b = {4,{5,6},7}
a + b
5 +---+ 10
|7 8|
+---+
b = [7,8].enclose()
a + b
+---+ +----+ +-----+
|8 9| |9 10| |10 11|
+---+ +----+ +-----+