Return `True` if `a` is one-dimensional
174030
def is1d(a:Collection)->bool:
    ""
    return len(a.shape) == 1 if hasattr(a, 'shape') else True
122848
function ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {
    var otherDimIndex = 1 - dimIndex;
    var dimName = coordSys.dimensions[dimIndex];
    return isInifinity(fromCoord[otherDimIndex]) && isInifinity(toCoord[otherDimIndex])
        && fromCoord[dimIndex] === toCoord[dimIndex] && coordSys.getAxis(dimName).containData(fromCoord[dimIndex]);
}
245935
def is_solved(self):
        
        for side in "LUFDRB":
            sample = self.cube[side].facings[side]
            for square in sum(self.cube.get_face(side), []):
                if square != sample:
                    return False
        return True
1193365
function ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {
    var otherDimIndex = 1 - dimIndex;
    return isInifinity(fromCoord[otherDimIndex]) && isInifinity(toCoord[otherDimIndex]);
}
1185831
def is_solved(self):
        
        if self.cube.D == [[Square(self.cube["D"].colour)] * 3] * 3:
            for face in "LFRB":
                if self.cube.get_face(face)[1:] != [[Square(self.cube[face].colour)] * 3] * 2:
                    return False
            return True
        return False
789700
def is_coordinate_variable(ds, variable):
    '''
    
    '''
    if variable not in ds.variables:
        return False
    return ds.variables[variable].dimensions == (variable,)
1004758
def _compare_dimensions_to_fields(self) -> bool:
        
        for name, item in self._dimension_fields.items():
            if item.value != self._nested_items[name].value:
                return False
        return True
680294
def isvector_or_scalar(a):
    
    try:
        return a.size and a.ndim-a.shape.count(1) <= 1
    except:
        return False
651900
def check_semidefinite_positiveness(A):
    
    B = empty_like(A)
    B[:] = A
    B[diag_indices_from(B)] += sqrt(finfo(float).eps)
    try:
        cholesky(B)
    except LinAlgError:
        return False
    return True
896403
def is_zero(self):
        """"""
        for o in self.matrix.ravel():
            try:
                if not o.is_zero:
                    return False
            except AttributeError:
                if not o == 0:
                    return False
        return True
1132388
def is_dimension(self):
        """"""
        from ambry.valuetype.core import ROLE
        return self.role == ROLE.DIMENSION
668974
def _check_signal(self, s):
        """
        s = np.asanyarray(s)
        if s.shape[0] != self.n_vertices:
            raise ValueError('First dimension must be the number of vertices '
                             'G.N = {}, got {}.'.format(self.N, s.shape))
        return s
1067568
private boolean process(DMatrixRMaj A) {
		if( !solverNull.process(A,2,nullspace) )
			return false;

		SpecializedOps_DDRM.subvector(nullspace, 0, 0, 9, false, 0, F1);
		SpecializedOps_DDRM.subvector(nullspace, 0, 1, 9, false, 0, F2);

		return true;
	}
1099180
def bool(self):
        
        shape = self.shape
        if shape != (1,) and shape != (1, 1):
            raise ValueError(
                """The PandasObject does not have exactly
                                1 element. Return the bool of a single
                                element PandasObject. The truth value is
                                ambiguous. Use a.empty, a.item(), a.any()
                                or a.all()."""
            )
        else:
            return self._to_pandas().bool()
1018321
def check_valid_hierarchies(instance):
    
    hierarchies = instance.get('hierarchies', {}).values()
    dimensions = set(instance.get('dimensions', {}).keys())
    all_levels = set()
    for hierarcy in hierarchies:
        levels = set(hierarcy.get('levels', []))
        if len(all_levels.intersection(levels)) > 0:
            # Dimension appears in two different hierarchies
            return False
        all_levels = all_levels.union(levels)
        if not dimensions.issuperset(levels):
            # Level which is not in a dimension
            return False
    return True
852988
def is_sparse_vector(x):
    
    return sp.issparse(x) and len(x.shape) == 2 and x.shape[0] == 1
172027
def check_symmetry(A):
    
    A = asanyarray(A)
    if A.ndim != 2:
        raise ValueError("Checks symmetry only for bi-dimensional arrays.")

    if A.shape[0] != A.shape[1]:
        return False

    return abs(A - A.T).max() < sqrt(finfo(float).eps)