Skip to content

Commit

Permalink
Merge pull request #27 from davidbrochart/default_params
Browse files Browse the repository at this point in the history
Fix create_array with default compressor
  • Loading branch information
davidbrochart committed Dec 15, 2020
2 parents 9839fc7 + cd38358 commit 7518411
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/xtensor-zarr/xzarr_hierarchy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ namespace xt
template <class shape_type, class C>
zarray create_array(const std::string& path, shape_type shape, shape_type chunk_shape, const std::string& dtype, char chunk_memory_layout='C', char chunk_separator='/', const C& compressor=xio_binary_config(), const nlohmann::json& attrs=nlohmann::json::object(), std::size_t chunk_pool_size=1, const nlohmann::json& fill_value=nlohmann::json());

template <class shape_type>
zarray create_array(const std::string& path, shape_type shape, shape_type chunk_shape, const std::string& dtype, char chunk_memory_layout='C', char chunk_separator='/', const xio_binary_config& compressor=xio_binary_config(), const nlohmann::json& attrs=nlohmann::json::object(), std::size_t chunk_pool_size=1, const nlohmann::json& fill_value=nlohmann::json());

zarray get_array(const std::string& path, std::size_t chunk_pool_size=1);

xzarr_group<store_type> create_group(const std::string& path, const nlohmann::json& attrs=nlohmann::json::object(), const nlohmann::json& extensions=nlohmann::json::array());
Expand Down Expand Up @@ -88,6 +91,13 @@ namespace xt
return create_zarr_array(m_store, path, shape, chunk_shape, dtype, chunk_memory_layout, chunk_separator, compressor, attrs, chunk_pool_size, fill_value, m_zarr_version);
}

template <class store_type>
template <class shape_type>
zarray xzarr_hierarchy<store_type>::create_array(const std::string& path, shape_type shape, shape_type chunk_shape, const std::string& dtype, char chunk_memory_layout, char chunk_separator, const xio_binary_config& compressor, const nlohmann::json& attrs, std::size_t chunk_pool_size, const nlohmann::json& fill_value)
{
return create_zarr_array(m_store, path, shape, chunk_shape, dtype, chunk_memory_layout, chunk_separator, compressor, attrs, chunk_pool_size, fill_value, m_zarr_version);
}

template <class store_type>
zarray xzarr_hierarchy<store_type>::get_array(const std::string& path, std::size_t chunk_pool_size)
{
Expand Down

0 comments on commit 7518411

Please sign in to comment.