class_docstr: Cox regression learner, using the partial Cox likelihood for
  proportional risks, with many choices of penalization.
  
  Note that this learner does not have predict functions
  
  Parameters
  ----------
  C : `float`, default=1e3
      Level of penalization
  
  penalty : {'none', 'l1', 'l2', 'elasticnet', 'tv', 'binarsity'}, default='l2'
      The penalization to use. Default is 'l2', namely Ridge penalization
  
  solver : {'gd', 'agd'}, default='agd'
      The name of the solver to use.
  
  warm_start : `bool`, default=False
      If true, learning will start from the last reached solution
  
  step : `float`, default=None
      Initial step size used for learning. Used when solver is 'gd' or
      'agd'.
  
  tol : `float`, default=1e-5
      The tolerance of the solver (iterations stop when the stopping
      criterion is below it). By default the solver does ``max_iter``
      iterations
  
  max_iter : `int`, default=100
      Maximum number of iterations of the solver
  
  verbose : `bool`, default=True
      If `True`, we verbose things, otherwise the solver does not
      print anything (but records information in history anyway)
  
  print_every : `int`, default=10
      Print history information when ``n_iter`` (iteration number) is
      a multiple of ``print_every``
  
  record_every : `int`, default=10
      Record history information when ``n_iter`` (iteration number) is
      a multiple of ``record_every``
  
  Other Parameters
  ----------------
  elastic_net_ratio : `float`, default=0.95
      Ratio of elastic net mixing parameter with 0 <= ratio <= 1.
      For ratio = 0 this is ridge (L2 squared) regularization
      For ratio = 1 this is lasso (L1) regularization
      For 0 < ratio < 1, the regularization is a linear combination
      of L1 and L2.
      Used in 'elasticnet' penalty
  
  random_state : int seed, RandomState instance, or None (default)
      The seed that will be used by stochastic solvers. Used in 'sgd',
      'svrg', and 'sdca' solvers
  
  blocks_start : `numpy.array`, shape=(n_features,), default=None
      The indices of the first column of each binarized feature blocks. It
      corresponds to the ``feature_indices`` property of the
      ``FeaturesBinarizer`` preprocessing.
      Used in 'binarsity' penalty
  
  blocks_length : `numpy.array`, shape=(n_features,), default=None
      The length of each binarized feature blocks. It corresponds to the
      ``n_values`` property of the ``FeaturesBinarizer`` preprocessing.
      Used in 'binarsity' penalty
  
  Attributes
  ----------
  coeffs : np.array, shape=(n_features,)
      The learned coefficients of the model
code: def _all_safe(
      self, features: np.ndarray, times: np.array, censoring: np.array
  ):
      if not set(np.unique(censoring)).issubset({0, 1}):
          raise ValueError(
              "``censoring`` must only have values in {0, 1}"
          )
      # All times must be positive
      if not np.all(times >= 0):
          raise ValueError(
              "``times`` array must contain only non-negative "
              "entries"
          )
      features = safe_array(features)
      times = safe_array(times)
      censoring = safe_array(censoring, np.ushort)
      return features, times, censoring
  
file_path: tick/tick/survival/cox_regression.py
imports: import numpy
  from tick.base import actual_kwargs
  from tick.preprocessing.utils import safe_array
  from .model_coxreg_partial_lik import ModelCoxRegPartialLik
  from tick.base.learner import LearnerOptim
label_desc: Use image node_id 3 for calling the CoxRegression obj's underlying member method code with example usage: obj._all_safe(features, times, censoring) and returns: features,  times,  censoring