You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically this isn't rank polymorphism since dt arrays don't have rank i.e They cannot be multi-dimensional. However they do have depth(i.e nesting). Although rank could be useful for dealing with tabular data
Also this means you will need some kind of rank/depth modifiers as well functions to control it e.g
example ← 10‿10⥊↕100# Assume this is something useful
┌─
╵ 0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
┘
# plus-insertSum ← +˝Sumexample# Columnwise
⟨ 450460470480490500510520530540 ⟩
Sum⎉¯1example# Rowwise
⟨ 45145245345445545645745845945 ⟩
(⊑∘Sum∘⥊) example# The total sum4950
I would recommend reading the J documentation on Rank or spending some time with an array language to get a feel for it
IMO rank is perfectly suited for the language. It would finally allow shell invocations to mirror scripts. Shell invocations would just be Array -> Array
Thanks for chiming in, the rank vs depth distinction is good to call out. I guess I was thinking more of depth as a proxy for rank
I think a proper rank really only makes sense when getting into math operations, so I might save it for later. I don't know what rank would mean for text processing, for example, and that's more of dt's bread and butter
Why not?
Currently these would be errors, but they could easily be rank polymorphic:
The text was updated successfully, but these errors were encountered: