Skip to content

masked arrays may not possess enough memory to represent "nan" #3691

@JamesBrofos

Description

@JamesBrofos

Version of Awkward Array

2.8.9

Description and code to reproduce

Consider the following example:

import awkward as ak


arr = ak.Array(["1", "n", None])
df = ak.to_dataframe(arr)
print(df)

The result will print

      values
entry       
0          1
1          n
2          n

Even though awkward makes an effort to fill masked numpy arrays with the string "nan", we see that this is not working. The issue is that the amount of memory allocated to arrays containing only very short strings (less than three characters, namely) is not enough to represent "nan". I imagine that this can lead to confusion, especially if one of the non-null strings is something like "n" as in the above example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe problem described is something that must be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions