Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Are nested masked arrays a valid type? #218

Description

@nsmith-

I managed to end up with something like

a = ak.JaggedArray.fromcounts(
    np.array([1, 0, 3]),
    ak.MaskedArray(
        np.array([True, False, True, False]),
        np.arange(4),
    )
)

which gives <JaggedArray [[None] [] [1 None 3]] at 0x000111048690>, and then proceeded to select some index inside the array with

af = a[a.argmax()].pad(1, clip=True).flatten()

leaving me <MaskedArray [None None 3] at 0x00013a865750>. All good so far, but the type is very strange: ArrayType(3, OptionType(OptionType(dtype('int64')))) I don't understand what nested OptionType means. I can collapse it at least: af[~af.boolmask()].content.content returns array([3]).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions