Changeset 24254


Ignore:
Timestamp:
10/18/19 00:13:27 (5 years ago)
Author:
jdquinn
Message:

BUG: Extra spaces (committing progress, but grep and manual fix is taking too long; will talk tomorrow to Basile about reverting and modifying his syntax parsing script)

Location:
issm/trunk-jpl/src/m
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/coordsystems/ll2xy.m

    r22339 r24254  
    1 function [x,y,scale_factor] = ll2xy(lat,lon,sgn,central_meridian,standard_parallel) 
     1function [x,y,scale_factor] = ll2xy(lat,lon,sgn,central_meridian,standard_parallel)
    22%LL2XY - converts lat long to polar stereographic
    33%
    4 %   Converts from geodetic latitude and longitude to Polar 
     4%   Converts from geodetic latitude and longitude to Polar
    55%   Stereographic (X,Y) coordinates for the polar regions.
    66%   Optional scale factor provides the scaling factor needed to correct projection error
     
    1313%      [x,y] = ll2xy(lat,lon,sgn,central_meridian,standard_parallel)
    1414%
    15 %      - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70)
    16 %                              -1 : south latitude (default is mer=0  lat=71)
     15%      - sgn = Sign of latitude         1 : north latitude (default is mer=45 lat=70)
     16%                                  -1 : south latitude (default is mer=0  lat=71)
    1717
    1818%Get central_meridian and standard_parallel depending on hemisphere
     
    5555T = tan(pi/4-latitude/2) ./ ((1-ex*sin(latitude))./(1+ex*sin(latitude))).^(ex/2);
    5656
    57 if (90 - slat) <  1.e-5 
     57if (90 - slat) <  1.e-5
    5858        rho = 2.*re*T/sqrt((1.+ex)^(1.+ex)*(1.-ex)^(1.-ex));
    5959else
  • issm/trunk-jpl/src/m/coordsystems/ll2xy.py

    r24213 r24254  
    1414      x, y = ll2xy(lat, lon, sgn, central_meridian, standard_parallel)
    1515
    16  - sgn = Sign of latitude + 1 : north latitude (default is mer = 45 lat = 70)
    17  - 1 : south latitude (default is mer = 0  lat = 71)
     16 - sgn = Sign of latitude       1 : north latitude (default is mer = 45 lat = 70)
     17                                                   -1 : south latitude (default is mer = 0  lat = 71)
    1818    '''
    1919
    20     assert sgn == 1 or sgn == - 1, 'error: sgn should be either + 1 or - 1'
     20    assert sgn == 1 or sgn == -1, 'error: sgn should be either 1 or -1'
    2121
    2222    #Get central_meridian and standard_parallel depending on hemisphere
     
    5353        rho = re * mc * T / tc
    5454
    55     y = - rho * sgn * np.cos(sgn * longitude)
     55    y = -rho * sgn * np.cos(sgn * longitude)
    5656    x = rho * sgn * np.sin(sgn * longitude)
    5757
  • issm/trunk-jpl/src/m/coordsystems/xy2ll.m

    r22493 r24254  
    1414%      [lat,lon] = xy2ll(x,y,sgn,central_meridian,standard_parallel);
    1515%
    16 %      - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70)
    17 %                              -1 : south latitude (default is mer=0  lat=71)
     16%      - sgn = Sign of latitude         1 : north latitude (default is mer=45 lat=70)
     17%                                  -1 : south latitude (default is mer=0  lat=71)
    1818
    1919%Get central_meridian and standard_parallel depending on hemisphere
     
    2929                disp('Warning: expecting coordinates in polar stereographic (Std Latitude: 71ºS Meridian: 0º)');
    3030        else
    31                 error('Sign should be either +1 or -1');
     31                error('Sign should be either 1 or -1');
    3232        end
    3333else
     
    7878lon = lon * 180. / pi;
    7979lat = lat * 180. / pi;
    80 lon = lon - delta; 
     80lon = lon - delta;
    8181if nargout==3,
    8282        m=((1+sin(abs(slat)*pi/180))*ones(length(lat),1)./(1+sin(abs(lat)*pi/180)));
  • issm/trunk-jpl/src/m/coordsystems/xy2ll.py

    r24213 r24254  
    1616       [lat, lon] = xy2ll(x, y, sgn, central_meridian, standard_parallel)
    1717
    18      - sgn = Sign of latitude + 1 : north latitude (default is mer = 45 lat = 70)
    19      - 1 : south latitude (default is mer = 0  lat = 71)
     18     - sgn = Sign of latitude   1 : north latitude (default is mer = 45 lat = 70)
     19                                                   -1 : south latitude (default is mer = 0  lat = 71)
    2020    '''
    2121
     
    2929            slat = 70.
    3030            print('        xy2ll: creating coordinates in north polar stereographic (Std Latitude: 70degN Meridian: 45deg)')
    31         elif sgn == - 1:
     31        elif sgn == -1:
    3232            delta = 0.
    3333            slat = 71.
    3434            print('        xy2ll: creating coordinates in south polar stereographic (Std Latitude: 71degS Meridian: 0deg)')
    3535        else:
    36             raise ValueError('sgn should be either + 1 or - 1')
     36            raise ValueError('sgn should be either 1 or -1')
    3737    else:
    3838        raise Exception('bad usage: type "help(xy2ll)" for details')
     
    6767
    6868    lat = sgn * lat
    69     lon = np.arctan2(sgn * x, - sgn * y)
     69    lon = np.arctan2(sgn * x, -sgn * y)
    7070    lon = sgn * lon
    7171
  • issm/trunk-jpl/src/m/dev/devpath.py

    r24241 r24254  
    1111    raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!')
    1212
    13     #Go through src / m and append any directory that contains a * .py file to PATH
     13    #Go through src/m and append any directory that contains a *.py file to PATH
    1414for root, dirs, files in os.walk(ISSM_DIR + '/src/m'):
    1515    if '.svn' in dirs:
    1616        dirs.remove('.svn')
    1717    for file in files:
    18         if file.find(".py") != - 1:
    19             if file.find(".pyc") == - 1:
     18        if file.find(".py") != -1:
     19            if file.find(".pyc") == -1:
    2020                if root not in sys.path:
    2121                    sys.path.append(root)
     
    3535            sys.path.append(jpl_path)
    3636    else:
    37         warnings.warn('cluster settings should be in, {} / usr / {}'.format(JPL_SVN, USERNAME))
     37        warnings.warn('cluster settings should be in, {}/usr/{}'.format(JPL_SVN, USERNAME))
    3838
    3939from runme import runme  #first because plotmodel may fail
  • issm/trunk-jpl/src/m/exp/expcoarsen.py

    r24213 r24254  
    5555                    yi = np.linspace(y[j], y[j + 1], division)
    5656
    57                     x = np.hstack((x[0:j + 1], xi[1: - 1], x[j + 1:]))
    58                     y = np.hstack((y[0:j + 1], yi[1: - 1], y[j + 1:]))
     57                    x = np.hstack((x[0:j + 1], xi[1:-1], x[j + 1:]))
     58                    y = np.hstack((y[0:j + 1], yi[1:-1], y[j + 1:]))
    5959
    6060                    #update current point
  • issm/trunk-jpl/src/m/exp/expread.py

    r24213 r24254  
    5050
    5151        if len(A[1]) > 5:
    52             contour['name'] = A[1][5: - 1]
     52            contour['name'] = A[1][5:-1]
    5353        else:
    5454            contour['name'] = ''
  • issm/trunk-jpl/src/m/exp/flowlines.py

    r24213 r24254  
    9191                flowindex = 0
    9292            elif flowdirection == 'downstream':
    93                 flowindex = - 1
     93                flowindex = -1
    9494
    9595            while not all(done):
     
    112112                #velocity of the current triangle and norm it
    113113                if flowdirection == 'upstream':
    114                     ut = - u[tria]
    115                     vt = - v[tria]
     114                    ut = -u[tria]
     115                    vt = -v[tria]
    116116                if flowdirection == 'downstream':
    117117                    ut = u[tria]
  • issm/trunk-jpl/src/m/geometry/NowickiProfile.py

    r24213 r24254  
    3939    #downstream of the GL
    4040    for i in range(int(np.size(x) / 2), int(np.size(x))):
    41         h[i] = (x[i] / (4. * (delta + 1) * q) + hg**(- 2))**(- 0.5)  # ice thickness for ice shelf from (3.1)
     41        h[i] = (x[i] / (4. * (delta + 1) * q) + hg**(-2))**(-0.5)  # ice thickness for ice shelf from (3.1)
    4242        b[i] = sea - h[i] * (1. / (1 + delta))
    4343
  • issm/trunk-jpl/src/m/geometry/SegIntersect.py

    r24213 r24254  
    4848
    4949    #if colinear
    50     if test1 * test2 == 0 and test3 * test4 == 0 and np.linalg.det(np.hstack((n1.reshape((- 1, )), n2.reshape(- 1, )))) == 0:
     50    if test1 * test2 == 0 and test3 * test4 == 0 and np.linalg.det(np.hstack((n1.reshape((-1, )), n2.reshape(-1, )))) == 0:
    5151
    5252        #projection on the axis O1O2
     
    5757        O1D = np.dot(O2O1, O1D)
    5858
    59     #test if one point is included in the other segment (- > bval = 1)
     59    #test if one point is included in the other segment (-> bval = 1)
    6060        if (O1C - O1A) * (O1D - O1A) < 0:
    6161            bval = 1
     
    7171            return bval
    7272
    73     #test if the 2 segments have the same middle (- > bval = 1)
     73    #test if the 2 segments have the same middle (-> bval = 1)
    7474        if O2O1 == 0:
    7575            bval = 1
  • issm/trunk-jpl/src/m/geometry/slope.py

    r24213 r24254  
    3434
    3535    summation = np.array([[1], [1], [1]])
    36     sx = np.dot(surf[index - 1, 0] * alpha, summation).reshape(- 1, )
    37     sy = np.dot(surf[index - 1, 0] * beta, summation).reshape(- 1, )
     36    sx = np.dot(surf[index - 1, 0] * alpha, summation).reshape(-1, )
     37    sy = np.dot(surf[index - 1, 0] * beta, summation).reshape(-1, )
    3838
    3939    s = np.sqrt(sx**2 + sy**2)
  • issm/trunk-jpl/src/m/mech/backstressfrominversion.py

    r24213 r24254  
    6262    T = 0.5 * md.materials.rho_ice * md.constants.g * (1 - md.materials.rho_ice / md.materials.rho_water) * md.geometry.thickness
    6363    n = averaging(md, md.materials.rheology_n, 0)
    64     Bi = md.results.StressbalanceSolution.MaterialsRheologyBbar.reshape(- 1, )
     64    Bi = md.results.StressbalanceSolution.MaterialsRheologyBbar.reshape(-1, )
    6565
    6666    a0, b0, theta0, ex0 = thomasparams(md, eq='Thomas', smoothing=smoothing, coordsys=coordsys)
  • issm/trunk-jpl/src/m/mech/damagefrominversion.py

    r24213 r24254  
    2626        raise Exception('Warning: the model has some non - SSA elements.  These will be treated like SSA elements')
    2727    if np.ndim(md.results.StressbalanceSolution.MaterialsRheologyBbar) == 2:
    28         Bi = md.results.StressbalanceSolution.MaterialsRheologyBbar.reshape(- 1, )
     28        Bi = md.results.StressbalanceSolution.MaterialsRheologyBbar.reshape(-1, )
    2929    else:
    3030        Bi = md.results.StressbalanceSolution.MaterialsRheologyBbar
    3131    if np.ndim(md.materials.rheology_B) == 2:
    32         BT = md.materials.rheology_B.reshape(- 1, )
     32        BT = md.materials.rheology_B.reshape(-1, )
    3333    else:
    3434        BT = md.materials.rheology_B
  • issm/trunk-jpl/src/m/mech/mechanicalproperties.py

    r24213 r24254  
    6060    vxlist = vx[index - 1] / md.constants.yts
    6161    vylist = vy[index - 1] / md.constants.yts
    62     ux = np.dot((vxlist * alpha), summation).reshape(- 1, )
    63     uy = np.dot((vxlist * beta), summation).reshape(- 1, )
    64     vx = np.dot((vylist * alpha), summation).reshape(- 1, )
    65     vy = np.dot((vylist * beta), summation).reshape(- 1, )
     62    ux = np.dot((vxlist * alpha), summation).reshape(-1, )
     63    uy = np.dot((vxlist * beta), summation).reshape(-1, )
     64    vx = np.dot((vylist * alpha), summation).reshape(-1, )
     65    vy = np.dot((vylist * beta), summation).reshape(-1, )
    6666    uyvx = (vx + uy) / 2.
    6767    #clear vxlist vylist
     
    6969    #compute viscosity
    7070    nu = np.zeros((numberofelements, ))
    71     B_bar = np.dot(md.materials.rheology_B[index - 1], summation / 3.).reshape(- 1, )
    72     power = ((md.materials.rheology_n - 1.) / (2. * md.materials.rheology_n)).reshape(- 1, )
    73     second_inv = (ux**2. + vy**2. + ((uy + vx)**2.) / 4. + ux * vy).reshape(- 1, )
     71    B_bar = np.dot(md.materials.rheology_B[index - 1], summation / 3.).reshape(-1, )
     72    power = ((md.materials.rheology_n - 1.) / (2. * md.materials.rheology_n)).reshape(-1, )
     73    second_inv = (ux**2. + vy**2. + ((uy + vx)**2.) / 4. + ux * vy).reshape(-1, )
    7474
    7575    #some corrections
     
    8686    elif 'matdamageice' in md.materials.__module__ and damage is not None:
    8787        print('computing damage-dependent properties!')
    88         Zinv = np.dot(1 - damage[index - 1], summation / 3.).reshape(- 1, )
     88        Zinv = np.dot(1 - damage[index - 1], summation / 3.).reshape(-1, )
    8989        location = np.nonzero(second_inv)
    9090        nu[location] = Zinv[location] * B_bar[location] / np.power(second_inv[location], power[location])
     
    109109    #eigenvalues and vectors for stress
    110110        value, directions = np.linalg.eig(stress)
    111         idx = value.argsort()[:: - 1]  # sort in descending algebraic (not absolute) order
     111        idx = value.argsort()[::-1]  # sort in descending algebraic (not absolute) order
    112112        value = value[idx]
    113113        directions = directions[:, idx]
     
    117117    #eigenvalues and vectors for strain
    118118        value, directions = np.linalg.eig(strain)
    119         idx = value.argsort()[:: - 1]  # sort in descending order
     119        idx = value.argsort()[::-1]  # sort in descending order
    120120        value = value[idx]
    121121        directions = directions[:, idx]
  • issm/trunk-jpl/src/m/mech/robintemperature.py

    r24213 r24254  
    1616
    1717    Parameters (SI units):
    18          - heatflux    Geothermal heat flux (W m^ - 2)
    19          - accumrate    Surface accumulation rate (m s^ - 1 ice equivalent)
     18         - heatflux    Geothermal heat flux (W m^-2)
     19         - accumrate    Surface accumulation rate (m s^-1 ice equivalent)
    2020         - thickness    Ice thickness (m)
    2121         - surftemp    Surface temperature (K)
     
    3030
    3131    # some constants (from Holland and Jenkins, 1999)
    32     alphaT = 1.14e-6  # thermal diffusivity (m^2 s^ - 1)
    33     c = 2009.  # specific heat capacity (J kg^ - 1 K^ - 1)
    34     rho = 917.  # ice density (kg m^ - 3)
     32    alphaT = 1.14e-6  # thermal diffusivity (m^2 s^-1)
     33    c = 2009.  # specific heat capacity (J kg^-1 K^-1)
     34    rho = 917.  # ice density (kg m^-3)
    3535
    3636    #create vertical coordinate variable
    3737    zstar = np.sqrt(2. * alphaT * thickness / accumrate)
    3838
    39     tprofile = surftemp + np.sqrt(2. * thickness * np.pi / accumrate / alphaT) * (- heatflux) / 2. / rho / c * (erf(z / zstar) - erf(thickness / zstar))
     39    tprofile = surftemp + np.sqrt(2. * thickness * np.pi / accumrate / alphaT) * (-heatflux) / 2. / rho / c * (erf(z / zstar) - erf(thickness / zstar))
    4040
    4141    return tprofile
  • issm/trunk-jpl/src/m/mech/thomasparams.py

    r24213 r24254  
    7272
    7373    # average element strain rates onto vertices
    74     e1 = averaging(md, md.results.strainrate.principalvalue1, smoothing) / md.constants.yts  # convert to s^ - 1
     74    e1 = averaging(md, md.results.strainrate.principalvalue1, smoothing) / md.constants.yts  # convert to s^-1
    7575    e2 = averaging(md, md.results.strainrate.principalvalue2, smoothing) / md.constants.yts
    7676    exx = averaging(md, md.results.strainrate.xx, smoothing) / md.constants.yts
     
    8181    pos = np.nonzero(e1 == 0)
    8282    if np.any(pos == 1):
    83         print('WARNING: first principal strain rate equal to zero.  Value set to 1e-13 s^ - 1')
     83        print('WARNING: first principal strain rate equal to zero.  Value set to 1e-13 s^-1')
    8484        e1[pos] = 1.e-13
    8585    pos = np.nonzero(e2 == 0)
    8686    if np.any(pos == 1):
    87         print('WARNING: second principal strain rate equal to zero.  Value set to 1e-13 s^ - 1')
     87        print('WARNING: second principal strain rate equal to zero.  Value set to 1e-13 s^-1')
    8888        e2[pos] = 1.e-13
    8989
     
    119119        ex = 0.5 * (exx + eyy) + 0.5 * (exx - eyy) * np.cos(2. * velangle) + exy * np.sin(2. * velangle)
    120120        ey = exx + eyy - ex  # trace of strain rate tensor is invariant
    121         exy = - 0.5 * (exx - eyy) * np.sin(2. * velangle) + exy * np.cos(2. * velangle)
     121        exy = -0.5 * (exx - eyy) * np.sin(2. * velangle) + exy * np.cos(2. * velangle)
    122122        a = ey / ex
    123123        b = exy / ex
     
    130130    pos = np.nonzero(np.abs((np.abs(a) - 2.)) < 1.e-3)
    131131    if len(pos) > 0:
    132         print(('Warning: ', len(pos), ' vertices have alpha within 1e-3 of - 2'))
     132        print(('Warning: ', len(pos), ' vertices have alpha within 1e-3 of -2'))
    133133    a[pos] = -2 + 1e-3
    134134
  • issm/trunk-jpl/src/m/partition/adjacency.py

    r24213 r24254  
    1919
    2020    md.qmu.adjacency = m.sparse(indi, indj, values, md.mesh.numberofvertices, md.mesh.numberofvertices)
    21     md.qmu.adjacency = np.logical_or(md.qmu.adjacency, md.qmu.adjacency.T).astype(float)  #change to reshape(- 1, 1) if needed
     21    md.qmu.adjacency = np.logical_or(md.qmu.adjacency, md.qmu.adjacency.T).astype(float)  #change to reshape(-1, 1) if needed
    2222
    2323    #now, build vwgt:
     
    2727    md.mesh.vertexconnectivity = NodeConnectivity(md.mesh.elements, md.mesh.numberofvertices)
    2828
    29     connectivity = md.mesh.vertexconnectivity[0][:, 0: - 1]
     29    connectivity = md.mesh.vertexconnectivity[0][:, 0:-1]
    3030    pos = np.where(connectivity)
    3131    connectivity[pos] = areas[connectivity[pos] - 1] / 3.
  • issm/trunk-jpl/src/m/partition/partitioner.py

    r24213 r24254  
    7676            weights = []
    7777
    78         method = method.reshape(- 1, 1)  # transpose to 1x10 instead of 10
     78        method = method.reshape(-1, 1)  # transpose to 1x10 instead of 10
    7979        #  partition into nparts
    8080        if isinstance(md.mesh, mesh2d):
     
    120120            part = project3d(md, 'vector', np.squeeze(part), 'type', 'node')
    121121
    122         part = part.reshape(- 1, 1)
     122        part = part.reshape(-1, 1)
    123123
    124124    if vectortype == 'element':
  • issm/trunk-jpl/src/m/qmu/helpers.py

    r24213 r24254  
    2424Example uses:
    2525
    26 x = Lstruct(1, 2, 3, 4) - > [1, 2, 3, 4]
     26x = Lstruct(1, 2, 3, 4) -> [1, 2, 3, 4]
    2727    x.a = 'hello'
    28     len(x) - > 4
     28    len(x) -> 4
    2929    x.append(5)
    30     len(x) - > 5
    31     x[2] - > 3
    32     x.a - > 'hello'
    33     print x - > [1, 2, 3, 4, 5]
    34     x.__dict__ - > {'a': 'hello'}
     30    len(x) -> 5
     31    x[2] -> 3
     32    x.a -> 'hello'
     33    print x -> [1, 2, 3, 4, 5]
     34    x.__dict__ -> {'a':'hello'}
    3535    x.b = [6, 7, 8, 9]
    36     x.b[-1] - > 9
    37     len(x.b) - > 4
     36    x.b[-1] -> 9
     37    len(x.b) -> 4
    3838
    3939Other valid constructors:
    40           x = Lstruct(1, 2, 3, a = 'hello') - > x.a - > 'hello', x - > [1, 2, 3]
     40          x = Lstruct(1, 2, 3, a = 'hello') -> x.a -> 'hello', x -> [1, 2, 3]
    4141          x = Lstruct(1, 2, 3)(a = 'hello')
    4242          x = Lstruct([1, 2, 3], x = 'hello')
    4343          x = Lstruct((1, 2, 3), a = 'hello')
    4444
    45 Credit: https: / / github.com / Vectorized / Python - Attribute-List
     45Credit: https://github.com/Vectorized/Python-Attribute-List
    4646'''
    4747
     
    6363class OrderedStruct(object):
    6464    '''
    65 A form of dictionary - like structure that maintains the
     65A form of dictionary-like structure that maintains the
    6666    ordering in which its fields / attributes and their
    6767    corresponding values were added.
     
    7070    can be used as an "ordered struct / class" giving
    7171    it much more flexibility in practice. It is
    72     also easier to work with fixed valued keys in - code.
     72    also easier to work with fixed valued keys in-code.
    7373
    7474Eg:
     
    7979    x.y = 5
    8080    OR
    81     x['y'] = 5  # supports OrderedDict - style usage
    82 
    83 Supports: len(x), str(x), for - loop iteration.
     81    x['y'] = 5  # supports OrderedDict-style usage
     82
     83Supports: len(x), str(x), for-loop iteration.
    8484Has methods: x.keys(), x.values(), x.items(), x.iterkeys()
    8585
     
    9494    #    in the same order as the inputs
    9595
    96     x.keys() - > ['y', 'z']
    97     x.values() - > [5, 6]
    98     x.items() - > [('y', 6), ('z', 6)]
    99     x.__dict__ - > [('y', 6), ('z', 6)]
    100     vars(x) - > [('y', 6), ('z', 6)]
    101 
    102     x.y - > 5
    103     x['y'] - > 5
    104     x.z - > 6
    105     x['z'] - > 6
     96    x.keys() -> ['y', 'z']
     97    x.values() -> [5, 6]
     98    x.items() -> [('y', 6), ('z', 6)]
     99    x.__dict__ -> [('y', 6), ('z', 6)]
     100    vars(x) -> [('y', 6), ('z', 6)]
     101
     102    x.y -> 5
     103    x['y'] -> 5
     104    x.z -> 6
     105    x['z'] -> 6
    106106
    107107    for i in x:  # same as x.items()
    108108        print i
    109      - >
     109     ->
    110110    ('x', 5)
    111111    ('y', 6)
     
    197197        # same thing but call deepcopy recursively
    198198        # technically not how it should be done,
    199         # (see https: / / docs.python.org / 2 / library / copy.html  #copy.deepcopy )
     199        # (see https://docs.python.org/2/library/copy.html  #copy.deepcopy )
    200200        # but will generally work in this case
    201201        newInstance = type(self)()
     
    227227def isempty(x):
    228228    '''
    229     returns true if object is +  - infinity, NaN, None, '', has length 0, or is an
    230     array / matrix composed only of such components (includes mixtures of "empty" types)'''
     229    returns true if object is +  -infinity, NaN, None, '', has length 0, or is an
     230    array/matrix composed only of such components (includes mixtures of "empty" types)'''
    231231
    232232    if type(x) in [list, np.ndarray, tuple]:
     
    247247    if x is None:
    248248        return True
    249     if type(x) == str and x.lower() in ['', 'nan', 'none', 'inf', 'infinity', ' - inf', ' - infinity']:
     249    if type(x) == str and x.lower() in ['', 'nan', 'none', 'inf', 'infinity', '-inf', '-infinity']:
    250250        return True
    251251
     
    280280def fileparts(x):
    281281    '''
    282     given:   "path / path / ... / file_name.ext"
     282    given:   "path/path/.../file_name.ext"
    283283    returns: [path, file_name, ext] (list of strings)'''
    284284    try:
     
    300300
    301301    fullfile(path, path, ... , file_name + ext)
    302     returns: "path / path / ... / file_name.ext"
    303 
    304     with all arguments as strings with no " / "s
     302    returns: "path/path/.../file_name.ext"
     303
     304    with all arguments as strings with no "/"s
    305305
    306306    regarding extensions and the '.':
     
    331331def empty_nd_list(shape, filler=0., as_numpy_ndarray=False):
    332332    '''
    333 returns a python list of the size / shape given (shape must be int or tuple)
     333returns a python list of the size/shape given (shape must be int or tuple)
    334334    the list will be filled with the optional second argument
    335335
     
    338338    as_numpy_ndarray will return the result as a numpy.ndarray and is False by default
    339339
    340     Note: the filler must be either None / np.nan / float('NaN'), float / double, or int
    341         other numpy and float values such as + / - np.inf will also work
     340    Note: the filler must be either None/np.nan/float('NaN'), float/double, or int
     341        other numpy and float values such as +/- np.inf will also work
    342342
    343343use:
Note: See TracChangeset for help on using the changeset viewer.