docstr: ...Test error and warnings raised by LogLearner constructor
          
docstr_tok: ["...","Test","error","and","warnings","raised","by","LogLearner","constructor"]
code: def test_safe_array_cast(self):
      """...Test error and warnings raised by LogLearner constructor"""
      msg = (
          "^Copying array of size \(5, 5\) to convert it in the "
          "right format$"
      )
      with self.assertWarnsRegex(RuntimeWarning, msg):
          LogisticRegression._safe_array(self.X.astype(int))
  
      msg = (
          "^Copying array of size \(3, 5\) to create a "
          "C-contiguous version of it$"
      )
      with self.assertWarnsRegex(RuntimeWarning, msg):
          LogisticRegression._safe_array(self.X[::2])
  
      np.testing.assert_array_equal(
          self.X, LogisticRegression._safe_array(self.X)
      )
  
imports: import itertools
  import unittest
  import numpy
  from sklearn.metrics import roc_auc_score
  from tick.base.inference import InferenceTest
  from tick.linear_model import SimuLogReg, LogisticRegression
  from tick.simulation import weights_sparse_gauss
  from tick.preprocessing.features_binarizer import FeaturesBinarizer
  from tick.prox import ProxZero, ProxL1, ProxL2Sq, ProxElasticNet, ProxTV, ProxBinarsity
label_desc: Use image node_id 14 for calling the Test obj's underlying member method code with example usage: obj.test_safe_array_cast() without return types