class_docstr: Tests SignalConv against scipy.signal.
class_docstr_tok: ["Tests","SignalConv","against","scipy.signal","."]
docstr: Upsample a numpy array.
code: def numpy_upsample(self, inputs, strides_up, extra_pad_end):
      """Upsample a numpy array."""
      input_shape = np.array(inputs.shape, dtype=int)
      strides_up = np.array(strides_up, dtype=int)
  
      input_shape[2:] *= strides_up
      if not extra_pad_end:
          input_shape[2:] -= strides_up - 1
      inputs_up = np.zeros(input_shape, dtype=np.float32)
      slices = [slice(None), slice(None)]
      slices += [slice(None, None, s) for s in strides_up]
      inputs_up[tuple(slices)] = inputs
  
      return inputs_up
  
imports: import os
  from absl.testing import parameterized
  import numpy
  import scipy.signal
  import tensorflow
  from tensorflow_compression.python.layers import initializers
  from tensorflow_compression.python.layers import parameters
  from tensorflow_compression.python.layers import signal_conv
label_desc: Use image node_id 1 for calling the ConvolutionsTest obj's underlying member method code with example usage: obj.numpy_upsample(inputs, strides_up, extra_pad_end) and returns: inputs_up