code: def test_temperature_scaling_bad_input_type():
      ts = TemperatureCalibration()
  
      x_train = [[1, 1], [2, 3.5]]
      y_train = [[0.9, 0.1], [0.2, 0.8]]
  
      x_val = [[0, 2]]
      y_val = [[0.8, 0.2]]
  
      # Test mixed types
      with pytest.raises(ValueError):
          ts.fit(x_train=None, y_train=np.array(y_train))
  
      with pytest.raises(ValueError):
          ts.fit(x_train=np.array(x_train), y_train=None)
  
      with pytest.raises(ValueError):
          ts.fit(x_train=x_train, y_train=np.array(y_train))
  
      with pytest.raises(ValueError):
          ts.fit(x_train=np.array(x_train), y_train=y_train)
  
      with pytest.raises(ValueError):
          ts.fit(
              x_train=np.array(x_train),
              y_train=np.array(y_train),
              x_val=np.array(x_val),
              y_val=None,
          )
  
      with pytest.raises(ValueError):
          ts.fit(
              x_train=np.array(x_train),
              y_train=np.array(y_train),
              x_val=None,
              y_val=np.array(y_val),
          )
  
      with pytest.raises(ValueError):
          ts.fit(
              x_train=np.array(x_train),
              y_train=np.array(y_train),
              x_val=np.array(x_val),
              y_val=y_val,
          )
  
      with pytest.raises(ValueError):
          ts.fit(
              x_train=np.array(x_train),
              y_train=np.array(y_train),
              x_val=x_val,
              y_val=np.array(y_val),
          )
  
      # some tests for the predict method where the input data have the wrong
      # dimensionality or type
      # first call fit
      ts.fit(x_train=np.array(x_train), y_train=np.array(y_train))
      # Now predict a new point
      x_test = [[1]]
  
      with pytest.raises(ValueError):
          ts.predict(x=x_test)  # wrong type
  
      with pytest.raises(ValueError):
          ts.predict(x=np.array(x_test))
  
file_path: stellargraph/tests/test_calibration.py
imports: import pytest
  import numpy
  from stellargraph.calibration import *
label_desc: Use image node_id 1 for calling a global function with example usage: test_temperature_scaling_bad_input_type() without return types