-
-
Notifications
You must be signed in to change notification settings - Fork 204
Open
Labels
Type: BugVersion: 0.17.2Will be tackled for the *next* small release.Will be tackled for the *next* small release.
Milestone
Description
This code:
from HARK.distribution import expected, Normal, DiscreteDistributionLabeled
gamma = DiscreteDistributionLabeled.from_unlabeled(
Normal(mu= 0, sigma = 1).discretize(**{"N" : 7}), var_names=["gamma"]
)
expected(func=lambda x: x, dist=gamma, labels=True)
Gets this error:
TypeError: <lambda>() got an unexpected keyword argument 'labels'
Even though the labels keyword argument to expected is explicitly supported in the documentation.
labels : bool
If True, the function should use labeled indexing instead of integer
indexing using the distribution's underlying rv coordinates. For example,
if `dims = ('rv', 'x')` and `coords = {'rv': ['a', 'b'], }`, then
the function can be `lambda x: x["a"] + x["b"]`.
https://github.com/econ-ark/HARK/blob/master/HARK/distribution.py#L2422
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: BugVersion: 0.17.2Will be tackled for the *next* small release.Will be tackled for the *next* small release.
Type
Projects
Status
In progress