code: def test_h2o_only_pipeline_with_numpy_arrays():
      # Note that in normal situations (release build), init_connection_args can be omitted
      # otherwise, it should be set to the first H2O element in the pipeline.
      # Also note that in this specific case mixing numpy inputs with a fully H2O pipeline,
      # the last estimator requires the `data_conversion=True` param in order to return numpy arrays in predictions.
      pipeline = Pipeline(
          [
              (
                  "standardize",
                  H2OScaler(init_connection_args=init_connection_args),
              ),
              ("pca", H2OPCA(k=2, seed=seed)),
              (
                  "estimator",
                  H2OGradientBoostingRegressor(
                      seed=seed, data_conversion=True
                  ),
              ),
          ]
      )
      data = _get_data(format="numpy")
      assert isinstance(data.X_train, np.ndarray)
      pipeline.fit(data.X_train, data.y_train)
      preds = pipeline.predict(data.X_test)
      assert isinstance(preds, np.ndarray)
      assert preds.shape == (len(data.X_test),)
  
      score = pipeline.score(data.X_test, data.y_test)
      assert isinstance(score, float)
      skl_score = r2_score(data.y_test, preds)
      assert abs(score - skl_score) < 1e-6
      scores["h2o_only_pipeline_with_numpy_arrays"] = score
  
file_path: h2o-3/h2o-py/tests/testdir_sklearn/pyunit_sklearn_regression_pipeline.py
imports: import importlib, inspect, os, sys
  import numpy
  from sklearn.datasets import make_regression
  from sklearn.decomposition import PCA
  from sklearn.metrics import r2_score
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  import h2o
  from h2o.sklearn import H2OGradientBoostingEstimator, H2OGradientBoostingRegressor, H2OScaler, H2OPCA
  from h2o.sklearn.wrapper import H2OConnectionMonitorMixin
  from tests import pyunit_utils, Namespace
label_desc: Use image node_id 3 for calling a global function with example usage: test_h2o_only_pipeline_with_numpy_arrays() without return types