0

I am making a neural network in Python and I want to generate training data for it. I need to make list of arrays.

I tried turning the arrays into lists. I tried the numpy.append() function and nothing worked.

2

1 Answer 1

2
final_array = array_camera.append(TD_camera)
final_direction = array_direction.append(TD_direction)

The above 2 lines doesn't work the way you expect.

append() function of list doesn't return anything. It adds data at the end of the list object through which the append() was called.

So final_array & final_direction will be None.

I think you just need to append data to final_array & final_direction. Like this

final_array ,final_direction =[],[]
.....
.....
final_array.append(TD_camera)
final_direction.append(TD_direction)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.