title: "AttributeError: 'numpy.ndarray' object has no attribute 'values'
body: <p>Here's a snippet of my code:</p>
  <pre><code>#code sample
  for i in range(1, number_of_segments + 1):
      I1 = (dcm_pixel_array[&quot;array&quot; + str(3 + (i - 1))]) * 2
      I8 = (dcm_pixel_array[&quot;array&quot; + str(3 + (7*int((number_of_segments+2)/8)) + (i-1) + 2)]) * 2
      for j in range(I1.ndim):
          for k in range(I1.ndim):
              if (3.03 - (17.85 + 14.87)) / (math.log((I8[j].values[k]) / (I1[j].values[k]))) &lt; 0:
                  T2_map = np.zeros(shape = (j, k, i))
              elif (3.03-(17.85+14.87))/(math.log((I8[j].values[k]) / (I1[j].values[k]))) &gt; 100:
                  T2_map = np.full((i,j,k), 100)
  # end of sample
  </code></pre>
  <p>I am getting the error on the line with the first if statement. It says: &quot;AttributeError: 'numpy.ndarray' object has no attribute 'values'&quot;. Any recommendations as to what I should do to correct the error?</p>
  <p>Clarifications: &quot;dcm_pixel_array&quot; is a dictionary of arrays (binary masks) that have been read from dicom files. The number of segments is 286. I am trying to access the information in the jth row of the kth column of the I8 and I1 arrays.</p>
  <p>Thank you!</p>