class_docstr: Helper methods to load, save and pre-process data used in MLlib.
  
  .. versionadded:: 1.0.0
docstr: Returns a new vector with `1.0` (bias) appended to
  the end of the input vector.
docstr_tok: ["Returns","a","new","vector","with","`","1.0","`","(","bias",")","appended","to","the","end","of","the","input","vector","."]
code: def appendBias(data: Vector) -> Vector:
      """
      Returns a new vector with `1.0` (bias) appended to
      the end of the input vector.
      """
      vec = _convert_to_vector(data)
      if isinstance(vec, SparseVector):
          newIndices = np.append(vec.indices, len(vec))
          newValues = np.append(vec.values, 1.0)
          return SparseVector(len(vec) + 1, newIndices, newValues)
      else:
          return _convert_to_vector(np.append(vec.toArray(), 1.0))
  
imports: import sys
  from functools import reduce
  import numpy
  from pyspark import SparkContext, since
  from pyspark.mllib.common import callMLlibFunc, inherit_doc
  from pyspark.mllib.linalg import Vectors, SparseVector, _convert_to_vector
  from pyspark.sql import DataFrame
  from typing import Generic, Iterable, List, Optional, Tuple, Type, TypeVar, cast, TYPE_CHECKING
  from pyspark.context import SparkContext
  from pyspark.mllib.linalg import Vector
  from pyspark.rdd import RDD
  from pyspark.sql.dataframe import DataFrame
label_desc: Use image node_id 6 for calling the MLUtils obj's underlying member method code with example usage: obj.appendBias(data) and returns: SparseVector, _convert_to_vector