You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia...@googlegroups.com
1 in [1,2,3] # returns true
NaN in [NaN, 1.0, 2.0] # returns false
how do I test if a float64 NaN is present in an array? I'm doing some numerical computation and it can have some NaN error, I want to drop the arrays that has NaN.
John Myles White
unread,
Dec 15, 2014, 3:35:22 PM12/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia...@googlegroups.com
You need to check isnan() per element. NaN == NaN is false, so in() fails on NaN right now.
-- John
Miles Lubin
unread,
Dec 15, 2014, 3:54:09 PM12/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia...@googlegroups.com
any(isnan,arr) is probably the most compact syntax.
Evan Pu
unread,
Dec 15, 2014, 5:58:38 PM12/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia...@googlegroups.com
come to think of it that is the right semantics.
well designed language this is!
Stefan Karpinski
unread,
Dec 15, 2014, 6:36:19 PM12/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Julia Users
It's arguable that `in` should use `isequal` for comparison since that's what a Dict does.
Toivo Henningsson
unread,
Dec 16, 2014, 6:40:02 AM12/16/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia...@googlegroups.com
+1
Stefan Karpinski
unread,
Dec 16, 2014, 11:49:46 AM12/16/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message