Skip to content

Incorrect encoding of numpy 1D vectors #4

@fangq

Description

@fangq

this issue was reported by Gavin Lobo, the following commands failed to return the correct array length using bjdata v0.4.0

import bjdata as bj
import numpy as np
bj.dumpb(np.array([1,2,3,4],dtype=np.int8))
    b'[$i#U\x01\x01\x02\x03\x04'

where the array length #U\x01 was incorrect, should have been #U\x04 as there are 4 elements.

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