-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationprocess + toolsupstreamUsed when our build breaks due to upstream changesUsed when our build breaks due to upstream changes
Description
>>>-------------------------------------------------------------------------
Exception in /home/runner/work/sgkit/sgkit/docs/getting_started.rst at block ending on line None
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-55-0ac15a3c444c> in <module>
----> 1 sg.diversity(ds, merge=False)
~/work/sgkit/sgkit/sgkit/stats/popgen.py in diversity(ds, cohort_allele_count, merge)
85 [1. , 1. ]])
86 """
---> 87 ds = define_variable_if_absent(
88 ds, variables.cohort_allele_count, cohort_allele_count, count_cohort_alleles
89 )
~/work/sgkit/sgkit/sgkit/utils.py in define_variable_if_absent(ds, default_variable_name, variable_name, func)
193 f"Variable '{variable_name}' with non-default name is missing and will not be automatically defined."
194 )
--> 195 return func(ds)
196
197
~/work/sgkit/sgkit/sgkit/stats/aggregation.py in count_cohort_alleles(ds, call_allele_count, merge)
303 AC, SC = da.asarray(ds.call_allele_count), da.asarray(ds.sample_cohort)
304 n_cohorts = SC.max().compute() + 1 # 0-based indexing
--> 305 C = da.empty(n_cohorts, dtype=np.uint8)
306
307 G = da.asarray(ds.call_genotype)
/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/dask/array/wrap.py in wrap_func_shape_as_first_arg(func, *args, **kwargs)
63 )
64
---> 65 parsed = _parse_wrap_args(func, args, kwargs, shape)
66 shape = parsed["shape"]
67 dtype = parsed["dtype"]
/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/dask/array/wrap.py in _parse_wrap_args(func, args, kwargs, shape)
33 dtype = np.dtype(dtype)
34
---> 35 chunks = normalize_chunks(chunks, shape, dtype=dtype)
36
37 name = name or funcname(func) + "-" + tokenize(
/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/dask/array/core.py in normalize_chunks(chunks, shape, limit, dtype, previous_chunks)
2730
2731 if shape is not None:
-> 2732 chunks = tuple(c if c not in {None, -1} else s for c, s in zip(chunks, shape))
2733
2734 if chunks and shape is not None:
/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/dask/array/core.py in <genexpr>(.0)
2730
2731 if shape is not None:
-> 2732 chunks = tuple(c if c not in {None, -1} else s for c, s in zip(chunks, shape))
2733
2734 if chunks and shape is not None:
TypeError: unhashable type: 'DataArray'
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationprocess + toolsupstreamUsed when our build breaks due to upstream changesUsed when our build breaks due to upstream changes