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

hgrecco / pint / 1701 / 6
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 01 Apr 2020 10:06PM UTC
Files 18
Run time 3s
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

01 Apr 2020 10:02PM UTC coverage: 88.286%. Remained the same
PKGS="python=3.6 uncertainties=3.0"

push

travis-ci

web-flow
Merge #1061

1061: allow passing mixed args to interp r=hgrecco a=keewis

When trying to pass something that I would consider as valid to `interp`, it fails:
```python
In [4]: x = np.arange(10) 
   ...: xi = np.arange(11, 13) 
   ...: y = np.linspace(0, 1, 10) * ureg.m 
   ...:  
   ...: np.interp(xi, x, y)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-0f23c156c96d> in <module>
      3 y = np.linspace(0, 1, 10) * ureg.m
      4 
----> 5 np.interp(xi, x, y)

<__array_function__ internals> in interp(*args, **kwargs)

.../pint/quantity.py in __array_function__(self, func, types, args, kwargs)
   1548 
   1549     def __array_function__(self, func, types, args, kwargs):
-> 1550         return numpy_wrap("function", func, args, kwargs, types)
   1551 
   1552     _wrapped_numpy_methods = ["flatten", "astype", "item"]

.../pint/numpy_func.py in numpy_wrap(func_type, func, args, kwargs, types)
    870     if name not in handled or any(is_upcast_type(t) for t in types):
    871         return NotImplemented
--> 872     return handled[name](*args, **kwargs)

.../pint/numpy_func.py in _interp(x, xp, fp, left, right, period)
    534     # Need to handle x and y units separately
    535     print("x, xp", x, xp, sep="\n -- ")
--> 536     (x, xp, period), _ = unwrap_and_wrap_consistent_units(x, xp, period)
    537     (fp, right, left), output_wrap = unwrap_and_wrap_consistent_units(fp, left, right)
    538     return output_wrap(np.interp(x, xp, fp, left=left, right=right, period=period))

.../pint/numpy_func.py in unwrap_and_wrap_consistent_units(*args)
    121 
    122     """
--> 123     first_input_units = _get_first_input_units(args)
    124     args, _ = convert_to_consistent_units(*args, pre_calc_units=first_input_units)
    125     return (

.../pint/numpy_func.py in _get_first_input_units(arg... (continued)

3512 of 3978 relevant lines covered (88.29%)

0.88 hits per line

Source Files on job 1701.6 (PKGS="python=3.6 uncertainties=3.0")
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1581
  • Travis Job 1701.6
  • cf2de30f on github
  • Prev Job for PKGS="python=3.6 uncertainties=3.0" on staging (#1699.6)
  • Next Job for PKGS="python=3.6 uncertainties=3.0" on staging (#1703.6)
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