• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hgrecco / pint / 1736 / 7
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 23 Apr 2020 09:27PM UTC
Files 18
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Apr 2020 09:22PM UTC coverage: 88.348% (+0.04%) from 88.305%
PKGS="python=3.7 uncertainties=3.0"

push

travis-ci

web-flow
Merge #1087

1087: Implement prod r=hgrecco a=keewis

This implements `numpy.prod`. Support for passing both `axis` and `where` is not quite there, yet, because I couldn't figure out how to broadcast `where` to match the shape of the input array:
```python
if axis is not None and where is not None:
    # broadcast where to match the shape of a:
    # ↓ this is not reliable and does not work well if a contains a dask.array
    where_ = np.broadcast_to(where, a.shape)

    exponents = np.sum(where_, axis=axis)
    exponent = np.max(exponents)
    if not all((exponents == exponent) | (exponents == 0)):
        # try to convert to dimensionless
        ...

result = np.prod(a._magnitude, *args, **kwargs)

if axis is not None and where is not None:
    units = a._units ** exponent
elif axis is not None:
    ...
else:
    ...
```

cc @jthielen

- [x] Closes #867
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file


Co-authored-by: Keewis <keewis@posteo.de>

3541 of 4008 relevant lines covered (88.35%)

0.88 hits per line

Source Files on job 1736.7 (PKGS="python=3.7 uncertainties=3.0")
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1615
  • Travis Job 1736.7
  • 5189aa01 on github
  • Prev Job for PKGS="python=3.7 uncertainties=3.0" on staging (#1732.7)
  • Next Job for PKGS="python=3.7 uncertainties=3.0" on staging (#1738.7)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc