JuliaArrays / JuliaArrays/MappedArrays.jl

ambigous method error on missings

Open
#40 3 comments 0 reactions 1 assignee View on GitHub

@johnnychen94 is already working on this.

Since Feb 18, 2021.

Dominant language
Julia
Stars
88
Forks
15
PR merge metrics
No merged PRs in 30d

Description

The following code converts from an Vector{Tuple} to a Vector of first entry of the Tuple. I expected that I can access it like a Vector. However, currently it errors with 'method is ambiguous'. How can I make it work?

tvec = allowmissing([(rand(),rand()) for i=1:6]);
tvec[1] = missing
c = mappedarray(x-> ismissing(x) ? missing : first(x),tvec);
c[1:2]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.