QBoard » Artificial Intelligence & ML » AI and ML - Conceptual » while doing my project i got the error how to solve this

while doing my project i got the error how to solve this

  • <pre>code:<br>X = sequences[:,0]<br>Y =sequences[:,1] </pre> <pre>TypeError Traceback (most recent call last) </pre> <pre><a style="color: var(--colab-anchor-color);" href="https://localhost:8080/#" data-href="<ipython-input-46-12f435f1f8a2>"><ipython-input-46-12f435f1f8a2></a> in <module>() ----> 1 X = sequences[:,0] 2 Y =sequences[:,1] 3 #X = np.expand_dims(X, 1) 4 #Y = np.expand_dims(Y, 1) </pre> <pre>TypeError: list indices must be integers or slices, not tuple</pre>
      May 5, 2019 12:18 PM IST
    0
  • try giving seperate bracket for accessing the list element for example:

    X = sequences[:,0]
    instead write

    X = sequences[:][0]
      May 5, 2019 12:49 PM IST
    0
  • I guess the item "..." is a form, then:

    1. Remove the "..." form from recent solution (and save somewhere)
    2. Recompile the project
    3. Save the solution
    4. Restart the solution
    5. Add the "..." form
    6. Recompile
      August 31, 2021 12:31 PM IST
    0