class_docstr: General PySpark tests that depend on numpy
code: def test_statcounter_array(self):
      import numpy as np
  
      x = self.sc.parallelize(
          [
              np.array([1.0, 1.0]),
              np.array([2.0, 2.0]),
              np.array([3.0, 3.0]),
          ]
      )
      s = x.stats()
      self.assertSequenceEqual([2.0, 2.0], s.mean().tolist())
      self.assertSequenceEqual([1.0, 1.0], s.min().tolist())
      self.assertSequenceEqual([3.0, 3.0], s.max().tolist())
      self.assertSequenceEqual([1.0, 1.0], s.sampleStdev().tolist())
  
      stats_dict = s.asDict()
      self.assertEqual(3, stats_dict["count"])
      self.assertSequenceEqual([2.0, 2.0], stats_dict["mean"].tolist())
      self.assertSequenceEqual([1.0, 1.0], stats_dict["min"].tolist())
      self.assertSequenceEqual([3.0, 3.0], stats_dict["max"].tolist())
      self.assertSequenceEqual([6.0, 6.0], stats_dict["sum"].tolist())
      self.assertSequenceEqual([1.0, 1.0], stats_dict["stdev"].tolist())
      self.assertSequenceEqual(
          [1.0, 1.0], stats_dict["variance"].tolist()
      )
  
      stats_sample_dict = s.asDict(sample=True)
      self.assertEqual(3, stats_dict["count"])
      self.assertSequenceEqual(
          [2.0, 2.0], stats_sample_dict["mean"].tolist()
      )
      self.assertSequenceEqual(
          [1.0, 1.0], stats_sample_dict["min"].tolist()
      )
      self.assertSequenceEqual(
          [3.0, 3.0], stats_sample_dict["max"].tolist()
      )
      self.assertSequenceEqual(
          [6.0, 6.0], stats_sample_dict["sum"].tolist()
      )
      self.assertSequenceEqual(
          [0.816496580927726, 0.816496580927726],
          stats_sample_dict["stdev"].tolist(),
      )
      self.assertSequenceEqual(
          [0.6666666666666666, 0.6666666666666666],
          stats_sample_dict["variance"].tolist(),
      )
  
imports: import math
  import sys
  import unittest
  from pyspark import serializers
  from pyspark.serializers import CloudPickleSerializer, CompressedSerializer, AutoBatchedSerializer, BatchedSerializer, AutoSerializer, NoOpSerializer, PairDeserializer, FlattenedValuesSerializer, CartesianDeserializer, CPickleSerializer, UTF8Deserializer, MarshalSerializer
  from pyspark.testing.utils import PySparkTestCase, read_int, write_int, ByteArrayOutput, have_numpy, have_scipy
label_desc: Use image node_id 1 for calling the NumPyTests obj's underlying member method code with example usage: obj.test_statcounter_array() without return types