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

hgrecco / pint / 1736
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 23 Apr 2020 09:24PM UTC
Jobs 16
Files 18
Run time 7min
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

pending completion
1736

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>

15 of 15 new or added lines in 1 file covered. (100.0%)

3604 of 4007 relevant lines covered (89.94%)

11.84 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1736.1 (PKGS="python=3.7 flake8 black isort") 23 Apr 2020 09:24PM UTC 0
0.0
Travis Job 1736.1
2 1736.2 (PKGS="python=3.7 ipython matplotlib nbsphinx numpy pandas jupyter_client ipykernel python-graphviz graphviz xarray sparse dask[complete] sphinx Pygments==2.3.1 docutils==0.14 alabaster commonmark==0.8.1 recommonmark==0.5.0") 23 Apr 2020 09:26PM UTC 0
0.0
Travis Job 1736.2
3 1736.3 (PKGS="python=3.6") 23 Apr 2020 09:24PM UTC 0
75.17
Travis Job 1736.3
4 1736.4 (PKGS="python=3.7") 23 Apr 2020 09:24PM UTC 0
75.1
Travis Job 1736.4
5 1736.5 (PKGS="python=3.8") 23 Apr 2020 09:24PM UTC 0
75.55
Travis Job 1736.5
6 1736.6 (PKGS="python=3.6 uncertainties=3.0") 23 Apr 2020 09:26PM UTC 0
88.35
Travis Job 1736.6
7 1736.7 (PKGS="python=3.7 uncertainties=3.0") 23 Apr 2020 09:27PM UTC 0
88.35
Travis Job 1736.7
8 1736.8 (PKGS="python=3.6 numpy=1.14 matplotlib") 23 Apr 2020 09:27PM UTC 0
84.71
Travis Job 1736.8
9 1736.9 (PKGS="python=3.7 numpy=1.14 matplotlib") 23 Apr 2020 09:28PM UTC 0
84.71
Travis Job 1736.9
10 1736.10 (PKGS="python=3.8 numpy=1.17 matplotlib") 23 Apr 2020 09:29PM UTC 0
87.54
Travis Job 1736.10
11 1736.11 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 23 Apr 2020 09:28PM UTC 0
85.83
Travis Job 1736.11
12 1736.12 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 23 Apr 2020 09:29PM UTC 0
85.75
Travis Job 1736.12
13 1736.13 (PKGS="python=3.6 numpy uncertainties") 23 Apr 2020 09:29PM UTC 0
88.27
Travis Job 1736.13
14 1736.14 (PKGS="python=3.7 numpy uncertainties") 23 Apr 2020 09:30PM UTC 0
88.35
Travis Job 1736.14
15 1736.15 (PKGS="python=3.8 numpy uncertainties") 23 Apr 2020 09:31PM UTC 0
88.54
Travis Job 1736.15
16 1736.16 (PKGS="python=3.8 numpy uncertainties sparse xarray netCDF4") 23 Apr 2020 09:31PM UTC 0
88.64
Travis Job 1736.16
Source Files on build 1736
  • Tree
  • List 18
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1736
  • 5189aa01 on github
  • Prev Build on staging (#1732)
  • Next Build on staging (#1738)
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