Skip to content

Commit 7518411

Browse files
Merge pull request #27 from davidbrochart/default_params
Fix create_array with default compressor
2 parents 9839fc7 + cd38358 commit 7518411

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/xtensor-zarr/xzarr_hierarchy.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ namespace xt
4141
template <class shape_type, class C>
4242
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());
4343

44+
template <class shape_type>
45+
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());
46+
4447
zarray get_array(const std::string& path, std::size_t chunk_pool_size=1);
4548

4649
xzarr_group<store_type> create_group(const std::string& path, const nlohmann::json& attrs=nlohmann::json::object(), const nlohmann::json& extensions=nlohmann::json::array());
@@ -88,6 +91,13 @@ namespace xt
8891
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);
8992
}
9093

94+
template <class store_type>
95+
template <class shape_type>
96+
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)
97+
{
98+
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);
99+
}
100+
91101
template <class store_type>
92102
zarray xzarr_hierarchy<store_type>::get_array(const std::string& path, std::size_t chunk_pool_size)
93103
{

0 commit comments

Comments
 (0)