class_docstr: Partial feature stats for dates/times.
class_docstr_tok: ["Partial","feature","stats","for","dates\/times","."]
docstr: Updates the partial Time statistics using the values.
  
  Args:
    values: A numpy array of values in a batch.
    value_type: The type of the values.
docstr_tok: ["Updates","the","partial","Time","statistics","using","the","values",".","Args",":","values",":","A","numpy","array","of","values","in","a","batch",".","value_type",":","The","type","of","the","values","."]
code: def update(
      self,
      values: np.ndarray,
      value_type: types.FeatureNameStatisticsType,
  ) -> None:
      """Updates the partial Time statistics using the values.
  
      Args:
        values: A numpy array of values in a batch.
        value_type: The type of the values.
      """
      self.considered += values.size
      if value_type == statistics_pb2.FeatureNameStatistics.STRING:
          for value in values:
              for strptime_format, time_regex in _TIME_RE_LIST:
                  if time_regex.match(value):
                      self.matching_formats[strptime_format] += 1
      elif value_type == statistics_pb2.FeatureNameStatistics.INT:
          for unix_time in _UNIX_TIMES:
              num_matching_values = np.sum(
                  (values >= unix_time.begin) & (values < unix_time.end)
              )
              if num_matching_values > 0:
                  self.matching_formats[
                      unix_time.format_constant
                  ] += num_matching_values
      else:
          raise ValueError(
              "Attempt to update partial time stats with values of an "
              "unsupported type."
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import calendar
  import collections
  import re
  import numpy
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import stats_util
  from tfx_bsl.arrow import array_util
  from typing import Iterable, Pattern, Text, Tuple
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 3 for calling the _PartialTimeStats obj's underlying member method code with example usage: obj.update(values, value_type) without return types