Skip to content

Instantly share code, notes, and snippets.

@karamanbk
Created June 9, 2019 08:23
Show Gist options
  • Save karamanbk/fae78e4b0894cc0812812e4e600e5860 to your computer and use it in GitHub Desktop.
Save karamanbk/fae78e4b0894cc0812812e4e600e5860 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Shamanbazooka
Copy link

Добрый день!
Я получаю ошибку при
отступе 41 print np.concatenate ([y_pred [index], X_test [index]], axis = 1)
^
SyntaxError: недопустимый синтаксис
В [41]:
#rebuild набор тестов для обратного преобразования
pred_test_set = []
для индекса в диапазоне (0, len (y_pred)):
print np.concatenate ([y_pred [index], X_test [index]], axis = 1)
pred_test_set.append (np .concatenate ([y_pred [индекс], X_test [индекс]], ось = 1))
Подскажите пожалуйста решение.
Спасибо

Это работает под управлением Python версии 2.X, в то время как вы используете Python 3.X, просто добавьте () для печати print(np.concatenate([y_pred[index],X_test[index]],axis=1))

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment