title: ValueError: Invalid RGBA argument. Why it can be? How can I fix it?
body: <p>I'm trying to create a simple cube following this code:</p>
  <pre><code>import matplotlib.pyplot as plt
  from mpl_toolkits.mplot3d import Axes3D
  import numpy as np
  
  
  # Create axis
  axes = [5,5,5]
  
  # Create Data
  data = np.ones(axes, dtype=np.bool)
  
  # Controll Tranperency
  alpha = 0.9
  
  # Control colour RGBA colour
  colors = np.empty(axes + [4], dtype=np.float32)
  
  colors[0] = [1, 0, 0, alpha] # red
  colors[1] = [0, 1, 0, alpha] # green
  colors[2] = [0, 0, 1, alpha] # blue
  colors[3] = [1, 1, 0, alpha] # yellow
  colors[4] = [1, 1, 1, alpha] # grey
  
  # Plot figure
  fig = plt.figure()
  ax = fig.add_subplot(111, projection='3d')
  
  # Voxels are used for customizations of sizes, positions, and colors.
  ax.voxels(data, facecolors=colors, edgecolors='grey')
  plt.show()
  </code></pre>
  <p>It works well. But when I change <code>axes = [10, 10, 10]</code>, here is the code:</p>
  <pre><code>import matplotlib.pyplot as plt
  from mpl_toolkits.mplot3d import Axes3D
  import numpy as np
  
  
  # Create axis
  axes = [10, 10, 10]
  
  # Create Data
  data = np.ones(axes, dtype=np.bool)
  
  # Controll Tranperency
  alpha = 0.9
  
  # Control colour RGBA colour
  colors = np.empty(axes + [4], dtype=np.float32)
  
  colors[0] = [1, 0, 0, alpha] # red
  colors[1] = [0, 1, 0, alpha] # green
  colors[2] = [0, 0, 1, alpha] # blue
  colors[3] = [1, 1, 0, alpha] # yellow
  colors[4] = [1, 1, 1, alpha] # grey
  
  # Plot figure
  fig = plt.figure()
  ax = fig.add_subplot(111, projection='3d')
  
  # Voxels are used for customizations of sizes, positions, and colors.
  ax.voxels(data, facecolors=colors, edgecolors='grey')
  plt.show()
  </code></pre>
  <p>sometimes it works, sometimes it doesn't, and throw the error: <code>ValueError: Invalid RGBA argument: 4.435719e+27</code>. The same error when I remove dtype in <code>data = np.ones(axes, type=np.bool)</code>. Now I am unable to debug the <code>Invalid RGBA argument</code> because I don't understand what is causing the error. I read <a href="https://stackoverflow.com/questions/53531429/valueerror-invalid-rgba-argument-what-is-causing-this-error">this</a>, but it seems that error about invalid shape, not invalid value.</p>
  <p>Why can this error happen? How can I fix it? Thank you very much.</p>