docstr: Converts np.ndarrays to lists that can be read by cmdstanpy.
docstr_tok: ["Converts","np.ndarrays","to","lists","that","can","be","read","by","cmdstanpy","."]
code: def prepare_data(init, data) -> Tuple[dict, dict]:
      """Converts np.ndarrays to lists that can be read by cmdstanpy."""
      cmdstanpy_data = {
          "T": data["T"],
          "S": data["S"],
          "K": data["K"],
          "tau": data["tau"],
          "trend_indicator": data["trend_indicator"],
          "y": data["y"].tolist(),
          "t": data["t"].tolist(),
          "cap": data["cap"].tolist(),
          "t_change": data["t_change"].tolist(),
          "s_a": data["s_a"].tolist(),
          "s_m": data["s_m"].tolist(),
          "X": data["X"].to_numpy().tolist(),
          "sigmas": data["sigmas"],
      }
  
      cmdstanpy_init = {
          "k": init["k"],
          "m": init["m"],
          "delta": init["delta"].tolist(),
          "beta": init["beta"].tolist(),
          "sigma_obs": init["sigma_obs"],
      }
      return (cmdstanpy_init, cmdstanpy_data)
  
imports: from __future__ import absolute_import, division, print_function
  from abc import abstractmethod, ABC
  from dataclasses import dataclass
  from typing import Sequence, Tuple
  from collections import OrderedDict
  from enum import Enum
  import importlib_resources
  import platform
  import logging
label_desc: Use image node_id 7 for calling the CmdStanPyBackend obj's underlying member method code with example usage: obj.prepare_data(init, data) and returns: cmdstanpy_init,  cmdstanpy_data