Shape: Difference between revisions

From The K Language Wiki
Content added Content deleted
(Created page with "{{primitive}} '''Shape''' is a primitive that returns the list of lengths along all axes of a uniform array. For ragged arrays it returns only as many items as there are level...")
 
No edit summary
Line 1: Line 1:
{{primitive}}
{{primitive|^x}}
'''Shape''' is a primitive that returns the list of lengths along all axes of a uniform array. For ragged arrays it returns only as many items as there are levels of uniformity.
'''Shape''' is a primitive that returns the list of lengths along all axes of a uniform array. For ragged arrays it returns only as many items as there are levels of uniformity.



Revision as of 19:04, 8 July 2021

Shape
^x

Shape is a primitive that returns the list of lengths along all axes of a uniform array. For ragged arrays it returns only as many items as there are levels of uniformity.

Shape is available in k3 and kona, and not available in k4, oK, ngn/k, and k9.

 ^(0 1 2;"ab",`c)
2 3
 ^(0 1 2;"abcd")
,2