I have a code and am unable to append a variable that was a string, to an array to set of arrays My code:
import face_recognition
import numpy as np
a = face_recognition.load_image_file('C:\\Users\zivsi\OneDrive\תמונות\סרט צילום\WIN_20191115_10_32_24_Pro.jpg') # my picture 1
a_encodings = face_recognition.face_encodings(a)[0]
b = face_recognition.load_image_file('C:\\Users\zivsi\OneDrive\תמונות\סרט צילום\WIN_20191115_09_48_56_Pro.jpg') # my picture 2
b_encodings = face_recognition.face_encodings(b)[0]
unknown = face_recognition.load_image_file('C:\\Users\zivsi\OneDrive\תמונות\סרט צילום\WIN_20191117_16_19_11_Pro.jpg')
unknown_encodings = face_recognition.face_encodings(unknown)[0]
print(type(b_encodings)) # This shows that the variable is an array type
b_encodings = str(b_encodings) # I make the array variable, a string
b_encodings = np.array(b_encodings) # I'm trying to turn the string back into the array
print(type(b_encodings)) # It writes that the variable really turned back into an array
results = face_recognition.compare_faces([a_encodings, b_encodings], unknown_encodings, tolerance=0.4) # Here's the problem, it doesn't read it as an array and displays an error
print(results)