You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xtensor uses allocator to allocate xarray, but unlike new T[N] which does not return nullptr if N == 0, std::allocator<char>{}.allocate(m_n_bytes) may return nullptr. When it happens in MSVC STL runtime, the following code
if (m_buffer == nullptr)
{
XTENSOR_THROW(std::runtime_error, "This npy_file has already been cast.");
}
will deem a zero-sized array from npy file not exists.
The text was updated successfully, but these errors were encountered:
xtensor uses
allocator
to allocate xarray, but unlikenew T[N]
which does not returnnullptr
ifN == 0
,std::allocator<char>{}.allocate(m_n_bytes)
may returnnullptr
. When it happens in MSVC STL runtime, the following codewill deem a zero-sized array from npy file not exists.
The text was updated successfully, but these errors were encountered: