Skip to content

Function to determine the number of bytes in a datashape. #42

@mrocklin

Description

@mrocklin

It would be nice to know how large our data is without looking at the data itself

>>> nbytes('2 * 2 * int64')
32

Generally assume the minimum storage required

>>> nbytes('{x: int32, y: int32}')
8

Accept that this is a hard task to do in general

>>> nbytes('string')
TypeError(...)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions