julia
2da9ddba - Change find() to return the same index type as pairs() (#24774)

Commit
8 years ago
Change find() to return the same index type as pairs() (#24774) This does not change anything for AbstractVector, Tuple and general iterables, which continue to use linear indices. For other AbstractArrays, return CartesianIndexes (rather than linear indices). For AbstractDict, AbstractString and NamedTuple, return keys (previously not supported at all). Relying on collect() to choose the return element type allows supporting any definition of pairs(), including that for Dict, which creates a standard Generator for which eltype() returns Any.
Author
Parents
Loading