File tree 1 file changed +0
-42
lines changed 1 file changed +0
-42
lines changed Original file line number Diff line number Diff line change @@ -1594,48 +1594,6 @@ def simple_linear_interpolation(a, steps):
1594
1594
.reshape ((len (x ),) + a .shape [1 :]))
1595
1595
1596
1596
1597
- def less_simple_linear_interpolation (x , y , xi , extrap = False ):
1598
- """
1599
- This function provides simple (but somewhat less so than
1600
- :func:`cbook.simple_linear_interpolation`) linear interpolation.
1601
- :func:`simple_linear_interpolation` will give a list of point
1602
- between a start and an end, while this does true linear
1603
- interpolation at an arbitrary set of points.
1604
-
1605
- This is very inefficient linear interpolation meant to be used
1606
- only for a small number of points in relatively non-intensive use
1607
- cases. For real linear interpolation, use scipy.
1608
- """
1609
- x = np .asarray (x )
1610
- y = np .asarray (y )
1611
- xi = np .atleast_1d (xi )
1612
-
1613
- s = list (y .shape )
1614
- s [0 ] = len (xi )
1615
- yi = np .tile (np .nan , s )
1616
-
1617
- for ii , xx in enumerate (xi ):
1618
- bb = x == xx
1619
- if np .any (bb ):
1620
- jj , = np .nonzero (bb )
1621
- yi [ii ] = y [jj [0 ]]
1622
- elif xx < x [0 ]:
1623
- if extrap :
1624
- yi [ii ] = y [0 ]
1625
- elif xx > x [- 1 ]:
1626
- if extrap :
1627
- yi [ii ] = y [- 1 ]
1628
- else :
1629
- jj , = np .nonzero (x < xx )
1630
- jj = max (jj )
1631
-
1632
- yi [ii ] = (y [jj ] +
1633
- (xx - x [jj ]) / (x [jj + 1 ] - x [jj ]) *
1634
- (y [jj + 1 ] - y [jj ]))
1635
-
1636
- return yi
1637
-
1638
-
1639
1597
@deprecated ('2.1' , alternative = 'shutil.rmtree' )
1640
1598
def recursive_remove (path ):
1641
1599
if os .path .isdir (path ):
You can’t perform that action at this time.
0 commit comments