def METHOD_NAME(caplog: LogCaptureFixture):
    partial_check = partial(from_example.validate_array, exception_cls=BentoMLException)
    with pytest.raises(BentoMLException) as ex:
        partial_check(np.array(["asdf"]))
    assert f'Expecting ndarray of dtype "{from_example._dtype}"' in str(ex.value)
    with pytest.raises(BentoMLException) as e:
        partial_check(np.array([[1]]))
    assert f'Expecting ndarray of shape "{from_example._shape}"' in str(e.value)
    # test cases where reshape is failed
    example = NumpyNdarray.from_sample(np.ones((2, 2, 3)))
    with caplog.at_level(logging.DEBUG):
        example.validate_array(np.array("asdf"))
    assert "Failed to reshape" in caplog.text