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
It seems that some effort was put into implementing map this way, so I figured I should post before putting time towards a pull request.
I'm assuming the reason for this is speed. I'd be interested to know, has anyone has profiled it done this way vs producing Any arrays?
I think it seems unlikely at first that the function you pass into map will return values of different types... but this has come up a couple times with strings for me. If the first string I output is plain ascii and then the second is utf8, I'm hosed.
ex:
julia> d = { "a" => "ascii", "u" => "u†f∞" }
{"u"=>"u†f∞","a"=>"ascii"}
julia> map((a)->d[a], ["a", "u"])
ERROR: invalid ASCII sequence
Maybe the case for strings can be special cased, or maybe map should just produce Any arrays.
The text was updated successfully, but these errors were encountered:
It seems that some effort was put into implementing
map
this way, so I figured I should post before putting time towards a pull request.I'm assuming the reason for this is speed. I'd be interested to know, has anyone has profiled it done this way vs producing Any arrays?
I think it seems unlikely at first that the function you pass into map will return values of different types... but this has come up a couple times with strings for me. If the first string I output is plain ascii and then the second is utf8, I'm hosed.
ex:
Maybe the case for strings can be special cased, or maybe map should just produce Any arrays.
The text was updated successfully, but these errors were encountered: