pyro-ppl / funsor

Functional tensors for probabilistic programming
https://funsor.pyro.ai
Apache License 2.0
236 stars 20 forks source link

Add dim,keepdims to Funsor.sum() method #503

Closed fritzo closed 3 years ago

fritzo commented 3 years ago

Addresses #489 Follows #490

This adds dim=None, keepdims=False parameters to the Funsor.sum() method. I'm hoping @ordabayevy will be able to add similar methods in #482 .

Tested

ordabayevy commented 3 years ago

I made similar changes for all of the reduction ops in #482 .

fritzo commented 3 years ago

Closing in favor of #482