def _default_for_dtype_and_shape ( self, dtype, shape ):
        """ Invent a suitable default value for a given dtype and shape. """
        from numpy import zeros

        if dtype is None:
            # Compatibility with the default of Traits 2.0
            dt = int
        else:
            dt = dtype
        if shape is None:
            value = zeros( ( 0, ), dt )
        else:
            size = []
            for item in shape:
                if item is None:
                    item = 1
                elif SequenceTypes in type( item ):
                    # Given a (minimum-allowed-length, maximum-allowed_length)
                    # pair for a particular axis, use the minimum.
                    item = item[0]
                size.append( item )
            value = zeros( size, dt )
        return value


#-------------------------------------------------------------------------------
#  'Array' trait:
#-------------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traits/traits/trait_numeric.py/AbstractArray._default_for_dtype_and_shape/swapped operands of `in`