myDataObject.astype('...') should raise a RuntimeError if dataObject is empty

Issue #102 resolved
M. Gronle created an issue

dobj = dataObject()
dobj.astype('float32') #should raise a defined RuntimeError, currently it is throwing an uncaught exception in Python

maybe verify other members of itom.dataObject, too

Comments (5)

  1. M. Gronle reporter

    This issue cannot be reproduced.

    This script

    t = ['uint8','int8','uint16','int16','int32','float32','float64','complex64','complex128','rgba32']
    
    for t1 in t:
        d = dataObject()
        a = d.astype(t1)
        print(t1, a.dtype)
    

    returns

    uint8 uint8
    int8 int8
    uint16 uint16
    int16 int16
    int32 int32
    float32 float32
    float64 float64
    complex64 complex64
    complex128 complex128
    rgba32 rgba32

    as desired.

    I propose to close this issue.

  2. Log in to comment