code: public SDVariable rank(String name, SDVariable in) {
          SDVariable ret = f().rank(in);
          return updateVariableNameAndReference(ret, name);
      }
docs: Returns the rank (number of dimensions, i.e., length(shape)) of the specified SDVariable as a 0D scalar variable
  
  @param name Name of the output variable
  @param in   Input variable
  @return 0D (scalar) output variable with value equal to the rank of the input variable