Need to check for structured array before using shape in from NumPy