class_docstr: This is a multi-point Kalman Filter implementation of
  https://github.com/rlabbe/filterpy/blob/master/filterpy/kalman/kalman_filter.py,
  with a subset of functionality.
  
  All Kalman Filter matrices are stack on the X axis. This is to allow
  for optimal global accesses on the GPU.
  
  Parameters
  ----------
  dim_x : int
      Number of state variables for the Kalman filter. For example, if
      you are tracking the position and velocity of an object in two
      dimensions, dim_x would be 4.
      This is used to set the default size of P, Q, and u
  
  dim_z : int
      Number of of measurement inputs. For example, if the sensor
      provides you with position in (x,y), dim_z would be 2.
  
  dim_u : int (optional)
      Size of the control input, if it is being used.
      Default value of 0 indicates it is not used.
  
  points : int (optional)
      Number of Kalman Filter points to track.
  
  dtype : dtype (optional)
      Data type of compute.
  
  Attributes
  ----------
  x : array(points, dim_x, 1)
      Current state estimate. Any call to update() or predict() updates
      this variable.
  
  P : array(points, dim_x, dim_x)
      Current state covariance matrix. Any call to update() or predict()
      updates this variable.
  
  z : array(points, dim_z, 1)
      Last measurement used in update(). Read only.
  
  R : array(points, dim_z, dim_z)
      Measurement noise matrix
  
  Q : array(points, dim_x, dim_x)
      Process noise matrix
  
  F : array(points, dim_x, dim_x)
      State Transition matrix
  
  H : array(points, dim_z, dim_x)
      Measurement function
  
  _alpha_sq : float (points, 1, 1)
      Fading memory setting. 1.0 gives the normal Kalman filter, and
      values slightly larger than 1.0 (such as 1.02) give a fading
      memory effect - previous measurements have less influence on the
      filter's estimates. This formulation of the Fading memory filter
      (there are many) is due to Dan Simon [1]_.
  
  Examples
  --------
  Here is a filter that tracks position and velocity using a sensor that only
  reads position.
  
  First construct the object with the required dimensionality,
  number of points, and data type.
  
  .. code::
  
      import cupy as cp
      import numpy as np
  
      from cusignal import KalmanFilter
  
      points = 1024
      kf = KalmanFilter(dim_x=4, dim_z=2, points=points, dtype=cp.float64)
  
  Assign the initial value for the state (position and velocity)
  for all Kalman Filter points.
  
  .. code::
  
      initial_location = np.array(
          [[10.0, 10.0, 0.0, 0.0]], dtype=dt
      ).T  # x, y, v_x, v_y
      kf.x = cp.repeat(
          cp.asarray(initial_location[cp.newaxis, :, :]), points, axis=0
      )
  
  Define the state transition matrix for all Kalman Filter points:
  
      .. code::
  
          F = np.array(
              [
                  [1.0, 0.0, 1.0, 0.0],  # x = x0 + v_x*dt
                  [0.0, 1.0, 0.0, 1.0],  # y = y0 + v_y*dt
                  [0.0, 0.0, 1.0, 0.0],  # dx = v_x
                  [1.0, 0.0, 0.0, 1.0],
              ],  # dy = v_y
              dtype=dt,
          )
          kf.F = cp.repeat(cp.asarray(F[cp.newaxis, :, :]), points, axis=0)
  
  Define the measurement function for all Kalman Filter points:
  
      .. code::
  
          H = np.array(
              [[1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 1.0]],
              dtype=dt,  # x_0  # y_0
          )
          kf.H = cp.repeat(cp.asarray(H[cp.newaxis, :, :]), points, axis=0)
  
  Define the covariance matrix for all Kalman Filter points:
  
      .. code::
  
          initial_estimate_error = np.eye(dim_x, dtype=dt) * np.array(
              [1.0, 1.0, 2.0, 2.0], dtype=dt
          )
          kf.P = cp.repeat(
              cp.asarray(initial_estimate_error[cp.newaxis, :, :]),
              points,
              axis=0,
          )
  
  Define the measurement noise  for all Kalman Filter points:
  
      .. code::
  
          measurement_noise = np.eye(dim_z, dtype=dt) * 0.01
          kf.R = cp.repeat(
              cp.asarray(measurement_noise[cp.newaxis, :, :]), points, axis=0
          )
  
  Define the process noise  for all Kalman Filter points:
  
      .. code::
          motion_noise = np.eye(dim_x, dtype=dt) * np.array(
              [10.0, 10.0, 10.0, 10.0], dtype=dt
          )
          kf.Q = cp.repeat(
              cp.asarray(motion_noise[cp.newaxis, :, :]), points, axis=0
          )
  
  Now just perform the standard predict/update loop:
  Note: This example just uses the same sensor reading for all points
  
      .. code::
  
          kf.predict()
          z = get_sensor_reading() (dim_z, 1)
          kf.z = cp.repeat(z[cp.newaxis, :, :], points, axis=0)
          kf.update()
  
  Results are in:
  
      .. code::
          kf.x[:, :, :]
  
  References
  ----------
  
  .. [1] Dan Simon. "Optimal State Estimation." John Wiley & Sons.
     p. 208-212. (2006)
  
  .. [2] Roger Labbe. "Kalman and Bayesian Filters in Python"
     https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python
docstr: Predict next state (prior) using the Kalman filter state propagation
  equations.
  
  Parameters
  ----------
  u : narray, default 0
      Optional control vector.
  
  B : array(points, dim_x, dim_u), or None
      Optional control transition matrix; a value of None
      will cause the filter to use `self.B`.
  
  F : array(points, dim_x, dim_x), or None
      Optional state transition matrix; a value of None
      will cause the filter to use `self.F`.
  
  Q : array(points, dim_x, dim_x), scalar, or None
      Optional process noise matrix; a value of None will cause the
      filter to use `self.Q`.
docstr_tok: ["Predict","next","state","(","prior",")","using","the","Kalman","filter","state","propagation","equations",".","Parameters","--","--","--","--","--","u",":","narray",",","default","0","Optional","control","vector",".","B",":","array","(","points",",","dim_x",",","dim_u",")",",","or","None","Optional","control","transition","matrix",";","a","value","of","None","will","cause","the","filter","to","use","`","self.B","`",".","F",":","array","(","points",",","dim_x",",","dim_x",")",",","or","None","Optional","state","transition","matrix",";","a","value","of","None","will","cause","the","filter","to","use","`","self.F","`",".","Q",":","array","(","points",",","dim_x",",","dim_x",")",",","scalar",",","or","None","Optional","process","noise","matrix",";","a","value","of","None","will","cause","the","filter","to","use","`","self.Q","`","."]
code: def predict(self, u=None, B=None, F=None, Q=None):
      """
      Predict next state (prior) using the Kalman filter state propagation
      equations.
  
      Parameters
      ----------
      u : narray, default 0
          Optional control vector.
  
      B : array(points, dim_x, dim_u), or None
          Optional control transition matrix; a value of None
          will cause the filter to use `self.B`.
  
      F : array(points, dim_x, dim_x), or None
          Optional state transition matrix; a value of None
          will cause the filter to use `self.F`.
  
      Q : array(points, dim_x, dim_x), scalar, or None
          Optional process noise matrix; a value of None will cause the
          filter to use `self.Q`.
  
      """
  
      # B will be ignored until implemented
      if u is not None:
          raise NotImplementedError(
              "Control Matrix implementation in process"
          )
  
      # if u is not None:
      #     u = cp.asarray(u)
  
      if B is None:
          B = self.B
      else:
          B = cp.asarray(B)
  
      if F is None:
          F = self.F
      else:
          F = cp.asarray(F)
  
      if Q is None:
          Q = self.Q
      elif cp.isscalar(Q):
          Q = cp.repeat(
              (cp.identity(self.dim_x, dtype=self.x.dtype) * Q)[
                  cp.newaxis, :, :
              ],
              self.points,
              axis=0,
          )
      else:
          Q = cp.asarray(Q)
  
      self.predict_kernel(
          self._alpha_sq,
          self.x,
          u,
          B,
          F,
          self.P,
          Q,
      )
  
imports: import cupy
  from ..utils.helper_tools import _get_numSM, _print_atts
  from .None import _filters_cuda
label_desc: Use image node_id 2 for calling the KalmanFilter obj's underlying member method code with example usage: obj.predict(u, B, F, Q) without return types