Interval Index Domain Error
2 posts
• Page 1 of 1
Interval Index Domain Error
So interval index gives a domain error when there are duplicates in the left argument:
We can write a little idiom for domain error free ( in case of dupes) interval index:
Which I had to do while writing a percentile ranking function.
Obviously it is no big deal to use this snippet when needed, but is there perhaps a case to eliminate the domain error in this case?
1 2 3 3 4 5⍸2.5 3.5 4.5
DOMAIN ERROR
1 2 3 3 4 5⍸2.5 3.5 4.5
∧
We can write a little idiom for domain error free ( in case of dupes) interval index:
1 2 3 3 4 5{u←∪⍺ ⋄ ⍺⍳u[u⍸⍵]}2.5 3.5 4.5
1 2 4
Which I had to do while writing a percentile ranking function.
Obviously it is no big deal to use this snippet when needed, but is there perhaps a case to eliminate the domain error in this case?
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Interval Index Domain Error
Paul,
We've been discussing this recently and came to the same conclusion as you: Interval Index should work with empty intervals. This change will be implemented in version 18.0.
Jay.
We've been discussing this recently and came to the same conclusion as you: Interval Index should work with empty intervals. This change will be implemented in version 18.0.
Jay.
- Jay|Dyalog
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group