• Olivier Delalleau's avatar
    Fixed tests when on_shape_error = 'raise' · 73d4fe6c
    Olivier Delalleau 提交于
    It is expected that some implementations of 'infer_shape' raise a ShapeError to
    indicate that they do not know how to compute the shape. In such a situation,
    we should silently fall back to the default implementation, regardless of the
    value of 'on_shape_error' (whose name may be misleading for developers, since
    we want to catch all exceptions *except* ShapeError).
    
    Also, when a bad shape was inferred, we should not raise a ShapeError (which
    may be caught silently), but rather something that indicates that there is a
    serious bug somewhere, like an AssertionError.
    73d4fe6c
opt.py 172.6 KB