wquantiles.median([1,2,3,4,5], weights = [0.15, 0.1, 0.2, 0.3, 0.25])
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-12-1caff6aaa564> in <module>
6
7 # example of the weighted median
----> 8 wquantiles.median([1,2,3,4,5], weights = [[0.15, 0.1, 0.2, 0.3, 0.25]])
/opt/conda/lib/python3.7/site-packages/wquantiles.py in median(data, weights)
93 Alias for `quantile(data, weights, 0.5)`.
94 """
---> 95 return quantile(data, weights, 0.5)
/opt/conda/lib/python3.7/site-packages/wquantiles.py in quantile(data, weights, quantile)
75 """
76 # TODO: Allow to specify the axis
---> 77 nd = data.ndim
78 if nd == 0:
79 TypeError("data must have at least one dimension")
AttributeError: 'list' object has no attribute 'ndim'
Could you help me please? I could not find any documentation.