title: Code works with small dataset, but not with larger dataset of the same shape
body: <p>I have a code for importing a dataset that consists of about 500,000 100 bp strings of DNA. I am trying to one hot encode the strings into a 2-D matrix. The code works and encodes a small subset of the whole dataset that consists of 999 strings, however it will not encode the full dataset. I am sure that all of the strings are of the same shape. </p>
  
  <p>I have made sure that the dataset consists of uniform 100 bp sequences, no more no less. I have also removed any sequences that do not contain "A", "G", "C", or "T".  The code works for small subsets of the data, but will not encode the entire dataset, despite it being the same shape.</p>
  
  <pre><code>from sklearn.preprocessing import LabelEncoder, OneHotEncoder
  integer_encoder = LabelEncoder()  
  one_hot_encoder = OneHotEncoder(categories='auto')   
  input_features = []
  
  for sequence in sequences:
    integer_encoded = integer_encoder.fit_transform(list(sequence))
    integer_encoded = np.array(integer_encoded).reshape(-1, 1)
    one_hot_encoded = one_hot_encoder.fit_transform(integer_encoded)
    input_features.append(one_hot_encoded.toarray())
  
  np.set_printoptions(threshold=40)
  input_features = np.stack(input_features)
  </code></pre>
  
  <p>The code when working with the small dataset of 999 strings will give me this output:</p>
  
  <pre><code>One hot encoding of Sequence #1:
   [[1. 1. 0. ... 1. 0. 1.]
   [0. 0. 0. ... 0. 0. 0.]
   [0. 0. 1. ... 0. 0. 0.]
   [0. 0. 0. ... 0. 1. 0.]]
  </code></pre>
  
  <p>However when I try the full dataset it throws this error:</p>
  
  <pre><code>ValueError: all input arrays must have the same shape
  </code></pre>