verdict.py
def recursive_array_shape( a, s=[], dtypes=[], level=0 ):
        '''Loop through and get max dimensions and datatypes of jagged array'''

        # Get length at current depth
        len_depth = np.array( a ).shape[0]

        # Compare to s
        if len( s ) > level:
            s[level] = max( s[level], len_depth )
        else:
            s.append( len_depth )

        # Recurse
        for v in a:
            if not pd.api.types.is_list_like( v ):
                if type( v ) not in dtypes:
                    if isinstance( v, str ):
                        dtype = len( v )
                    else:
                        dtype = type( v )
                    dtypes.append( dtype )
                continue
            s, dtypes = recursive_array_shape( v, s, dtypes, level+1 )

        return s, dtypes
Loop through and get max dimensions and datatypes of jagged array
Loop through and get max dimensions and datatypes of jagged array
Loop through and get max dimensions and datatypes of jagged array
def recursive_array_shape( a, s=[], dtypes=[], level=0 ):
        len_depth = np.array( a ).shape[0]
        if len( s ) > level:
            s[level] = max( s[level], len_depth )
        else:
            s.append( len_depth )
        for v in a:
            if not pd.api.types.is_list_like( v ):
                if type( v ) not in dtypes:
                    if isinstance( v, str ):
                        dtype = len( v )
                    else:
                        dtype = type( v )
                    dtypes.append( dtype )
                continue
            s, dtypes = recursive_array_shape( v, s, dtypes, level+1 )
        return s, dtypes
def recursive_array_shape ( a , s = [ ] , dtypes = [ ] , level = 0 ) : len_depth = np . array ( a ) . shape [ 0 ] if len ( s ) > level : s [ level ] = max ( s [ level ] , len_depth ) else : s . append ( len_depth ) for v in a : if not pd . api . types . is_list_like ( v ) : if type ( v ) not in dtypes : if isinstance ( v , str ) : dtype = len ( v ) else : dtype = type ( v ) dtypes . append ( dtype ) continue s , dtypes = recursive_array_shape ( v , s , dtypes , level + 1 ) return s , dtypes
Loop through and get max dimensions and datatypes of jagged array
Loop through and get max dimensions and datatypes of jagged array
'''Loop through and get max dimensions and datatypes of jagged array''' # Get length at current depth # Compare to s # Recurse
a
s
dtypes
level