You can edit your side menu content in the Appearance > Menus and set as Side Menu.
Zagran-tour – Cập nhật bản tin du lịch xu hướng mới nhất hiện nay
  • Home
  • Du Lịch
  • Văn Hóa
  • Ẩm Thực
  • Mẹo Vặt
  • Tổng Hợp
  • Khác
    • Công Nghệ
    • Game
    • Giải Trí
  • Home
  • Du Lịch
  • Văn Hóa
  • Ẩm Thực
  • Mẹo Vặt
  • Tổng Hợp
  • Khác
    • Công Nghệ
    • Game
    • Giải Trí

In Công Nghệ

What does numpy reshape(-1 1) mean?

14 Views June 28, 2020 34 Comments

What does numpy reshape(-1 1) mean? Pin It



Reshape your data either X.reshape(-1, 1) if your data has a single feature/column and X.reshape(1, -1) if it contains a single sample. If you are getting this error then in this video, I plan to demystify the confusion surrounding numpy reshape (1,-1) function.

I’ll use a simple example to explain what does -1 mean in numpy reshape.

If you do have any questions with what we covered in this video then feel free to ask in the comment section below & I’ll do my best to answer those.

If you enjoy these tutorials & would like to support them then the easiest way is to simply like the video & give it a thumbs up & also it’s a huge help to share these videos with anyone who you think would find them useful.

Please consider clicking the SUBSCRIBE button to be notified for future videos & thank you all for watching.

You can find me on:
Blog –
Twitter –
GitHub –
Medium –

#Reshape #Numpy #Python

Nguồn: https://zagran-tour.com/

Xem thêm bài viết khác: https://zagran-tour.com/cong-nghe/

Xem thêm Bài Viết:

  • Liên quân Reset Rank Mùa 12 ⭐ Trang Phục Miễn Phí Fennik Tay Đua F1 Mùa 14 Trải Nghiệm Game
  • How to Reset Adobe Photoshop 2020 to Default Settings
  • Reset Windows Server 2012/R2 Domain/Local Administrator Password
  • Windows 10 – How to Reset Your Forgotten Windows 10 Password
  • How to Fix Forgotten Windows 7 Password – Bypass Login Screen & Reset Password
Share

34

34 Comments

  1. Rahul Kole
    •
    8 months ago

    I am getting an attribute error 'builtin_function_or_method' object has no attribute 'reshape'. What to do?

    Reply
  2. carlos fotsing
    •
    8 months ago

    sir what about AttributeError: 'list' object has no attribute 'reshape'

    Reply
  3. Lex Li
    •
    8 months ago

    thank you, Bhavesh. this is v helpful. one follow up question, why do we only reshape x? why don't reshape both X and y?

    Reply
  4. Tommy Phillips
    •
    8 months ago

    Thank you! Made it easy to understand

    Reply
  5. Germán Distel
    •
    8 months ago

    Awesome, to-the-point explanation. Thanks

    Reply
  6. shiva kumar
    •
    8 months ago

    straight to the damn point, Good one !!

    Reply
  7. Harsh Patel
    •
    8 months ago

    How simply you did that!!! Amazing 👏👏

    Reply
  8. Faique Jatu
    •
    8 months ago

    helped me a lot sir, spent hours on figuring out that column.😅

    Reply
  9. urbaneplanner
    •
    8 months ago

    Thanks! I was struggling with what the -1 meant

    Reply
  10. Ameer ul Islam
    •
    8 months ago

    thanks

    Reply
  11. Suraj Verma
    •
    8 months ago

    Thanks for making it clear !!!

    Reply
  12. Kenny Osubor
    •
    8 months ago

    You're a G bro! Subscribed!

    Reply
  13. Sanjay S
    •
    8 months ago

    Thanks man,

    Reply
  14. RENZO ANDRE GONZALES MALDONADO
    •
    8 months ago

    Clean explanation, keep it up. Thanks a lot!!

    Reply
  15. Kushal Hu
    •
    8 months ago

    Thanku bro

    Reply
  16. CJ Johanson
    •
    8 months ago

    Thank you! This was super helpful!!!

    Reply
  17. Nandhagopal cs
    •
    8 months ago

    Straight into the point .Good job

    Reply
  18. Sachin Ladhad
    •
    8 months ago

    Please let me know why linear regression function is expecting 2D array or let me know where I can read the reason behind linear regression why it expects 2D array

    Reply
  19. fangyu wang
    •
    8 months ago

    thank you Bhavesh, finally someone answered my question!

    Reply
  20. Animesh Sharma
    •
    8 months ago

    x = x.reshape(len(x), 1) or in this case x = x.reshape(100, 1) will also do the work

    Reply
  21. Rohan Ahire
    •
    8 months ago

    Thanks, this saved a lot of time for me.

    Reply
  22. Emmanuel Masabo
    •
    8 months ago

    Well explained. Thank yoi

    Reply
  23. Mukesh Patel
    •
    8 months ago

    Nice and simple explanation 🙂

    Reply
  24. V K
    •
    8 months ago

    Thanks for the very fast, simple explanation!

    Reply
  25. tom tom
    •
    8 months ago

    Amazing ! Great stuff ,thanks a lot .This was such a help . All the Best 🙂

    Reply
  26. MARS HUO
    •
    8 months ago

    but the latter 1, it's add a dimension or convert into 1 dimension?

    Reply
  27. Mazahir Saleem
    •
    8 months ago

    I want to take csv file as my input. how can i reshape my data particularly the x variable in my csv file. every time i took a scv file as input and there occurs a dimensional error.

    Reply
  28. Cara Gillespie
    •
    8 months ago

    You're amazing! Thanks for taking the time to share, this was a huge help 🙏🏼

    Reply
  29. Vinod R
    •
    8 months ago

    thank you sir ,

    Reply
  30. Snehashish Banerjee
    •
    8 months ago

    Your explanation is good. But why 2D array is needed here?

    Reply
  31. Mohammed Al Tameemi
    •
    8 months ago

    you are a life saver thank you

    Reply
  32. bushwalkernsw
    •
    8 months ago

    it was very helpful. thank you

    Reply
  33. Dhruvin Suthar
    •
    8 months ago

    Hi, I am trying to do reshape to another dataset but I am getting an error "The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()." What is the best ways to solve it?

    Reply
  34. AK S
    •
    8 months ago

    Thanks it helped

    Reply

Leave a Comment

Previous Post

Finding Dory POP UP…

In Game

Finding Dory POP UP GAME Like Trouble! Finding Dory Pop Up Game with Nemo, Hank, Dory & Destiny

View Post

Next Post

Appvn và HiP4U : Store…

In Mẹo Vặt

Appvn và HiP4U : Store non-jailbreak hữu ích cho người dùng iOS

View Post

Tìm Kiếm

Lưu Trữ

  • February 2021
  • December 2020
  • November 2020
  • October 2020
  • July 2020
  • June 2020
  • January 2020

Xem Thêm

Gallery image with caption: [후아유 – 학교 2015 OST Part 1] 타이거 JK – Reset (Feat. 진실 of Mad Soul Child)
Gallery image with caption: Picasso Resizing & Scaling – Android Studio Tutorial
Gallery image with caption: Hướng dẫn tạo sao lưu và khôi phục hệ thống Windows với System Restore
Gallery image with caption: Hướng Dẫn Restore iPhone và Download Firmware iPhone
Gallery image with caption: Cool Hack# Use any trial versions software lifetime-forever free 2018
Gallery image with caption: Return trong hàm
Gallery image with caption: How To Factory Reset Your Windows Phone
Gallery image with caption: Cách ĐẶT LẠI iPhone không mất dữ liệu
Zagran-tour – Cập nhật bản tin du lịch xu hướng mới nhất hiện nay
  • Chính Sách Bảo Mật
  • Liên Hệ

Copyright @2020. By Zagran-tour