Added absolute_import

pep c_functions.c
master
Per A Brodtkorb 9 years ago
parent 0fd326937f
commit cd7b75b184

@ -1,7 +1,6 @@
"""
Covariance package in WAFO Toolbox.
"""
from core import * # CovData1D
#import models
import estimation
from __future__ import absolute_import
from .core import * # CovData1D
from . import estimation

@ -1,3 +1,3 @@
from info import __doc__
from info import *
from __future__ import absolute_import
from .info import __doc__
from .info import *

@ -15,7 +15,7 @@
void findrfc(double *y1,double hmin, int *ind, int n,int *info) {
double xminus,xplus,Tpl,Tmi,*y,Tstart;
int i,j,ix=0,NC,iy;
int i,j,ix=0,NC;
info[0] = 0;
if (*(y1+0)> *(y1+1)){
/* if first is a max , ignore the first max*/
@ -87,7 +87,6 @@ void findrfc(double *y1,double hmin, int *ind, int n,int *info) {
ix++;
*(ind+ix)=(Tstart+2*i+1);
ix++;
} /*if*/
goto L180;
L170:
@ -109,7 +108,6 @@ void findrfc(double *y1,double hmin, int *ind, int n,int *info) {
} /*if*/
} /*elseif*/
L180:
iy=i;
} /* for i */
info[0] = ix;
return ;

@ -4,8 +4,7 @@ Spectrum package in WAFO Toolbox.
Readme - Readme file for module SPEC in WAFO Toolbox
"""
from core import *
#SpecData1D, SpecData2D, cltext
import models
from __future__ import absolute_import
from .core import *
from . import models
from wafo.wave_theory import dispersion_relation

@ -340,7 +340,7 @@ from .core import *
from .distributions import *
from . import estimation
#remove vonmises_cython from __all__, I don't know why it is included
# remove vonmises_cython from __all__, I don't know why it is included
__all__ = [s for s in dir() if not (s.startswith('_') or s.endswith('cython'))]
from numpy.testing import Tester

@ -2,6 +2,7 @@
Transform package in WAFO Toolbox.
"""
from __future__ import absolute_import
from .core import *
from . import models
from . import estimation

@ -6,13 +6,13 @@ TrOchi
TrLinear
'''
# !/usr/bin/env python
from __future__ import division
from __future__ import division, absolute_import
from scipy.optimize import brentq # @UnresolvedImport
from numpy import (sqrt, atleast_1d, abs, imag, sign, where, cos, arccos, ceil,
expm1, log1p, pi)
import numpy as np
import warnings
from core import TrCommon, TrData
from .core import TrCommon, TrData
__all__ = ['TrHermite', 'TrLinear', 'TrOchi']
_example = '''
@ -453,10 +453,11 @@ class TrOchi(TrCommon2):
# g1='[x(2)-2.*x(1).^2.*x(2).^2-P1,
# 2.*x(1).*x(2).^2.*(3-8.*x(1).^2.*x(2))-P2 ]'
# Or solve the following 1D non-linear equation for sig2^2:
g2 = lambda x: -sqrt(abs(x - 1) * 2) * \
(3. * x - 4 * abs(x - 1)) + abs(skew)
def g2(x):
return (-sqrt(abs(x - 1) * 2) * (3. * x - 4 * abs(x - 1)) +
abs(skew))
a1 = 1. # % Start interval where sig2^2 is located.
a1 = 1. # Start interval where sig2^2 is located.
a2 = 2.
sig22 = brentq(g2, a1, a2) # % smallest solution for sig22

Loading…
Cancel
Save