|
|
|
@ -18,7 +18,7 @@ from scipy.special import gammaln
|
|
|
|
|
from scipy.integrate import trapz, simps
|
|
|
|
|
import warnings
|
|
|
|
|
from time import strftime, gmtime
|
|
|
|
|
from wafo.plotbackend import plotbackend
|
|
|
|
|
from wafo.plotbackend import plotbackend as plt
|
|
|
|
|
import numbers
|
|
|
|
|
try:
|
|
|
|
|
from wafo import c_library as clib # @UnresolvedImport
|
|
|
|
@ -867,7 +867,6 @@ def _findcross(xn, method='clib'):
|
|
|
|
|
return numba_misc.findcross(xn)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def findcross(x, v=0.0, kind=None, method='clib'):
|
|
|
|
|
'''
|
|
|
|
|
Return indices to level v up and/or downcrossings of a vector
|
|
|
|
@ -2140,6 +2139,8 @@ def polar2cart(theta, rho, z=None):
|
|
|
|
|
if z is None:
|
|
|
|
|
return x, y
|
|
|
|
|
return x, y, z
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pol2cart = polar2cart
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2168,6 +2169,8 @@ def cart2polar(x, y, z=None):
|
|
|
|
|
if z is None:
|
|
|
|
|
return t, r
|
|
|
|
|
return t, r, z
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cart2pol = cart2polar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2568,7 +2571,7 @@ def plot_histgrm(data, bins=None, range=None, # @ReservedAssignment
|
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
xx, yy, limits = _histogram(data, bins, range, normed, weights, density)
|
|
|
|
|
return plotbackend.plot(xx, yy, lintype, limits, limits * 0)
|
|
|
|
|
return plt.plot(xx, yy, lintype, limits, limits * 0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def num2pistr(x, n=3, numerator_max=10, denominator_max=10):
|
|
|
|
|