Python Forum
question about train_test_split()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about train_test_split()
#4
(Mar-06-2018, 07:18 AM)fadi Wrote:
(Mar-05-2018, 07:37 PM)mpd Wrote: It's just indicating that it's a long integer.

But the data I have are mix of negative and positive fraction integers, how can I avoid displaying the L?

Shape is just the number of samples multiplied by the number of features; it has nothing to do with what the data actually is.

This will print without the L:
print("test_y size = {0}".format(test_y.shape[0]))
Incidentally, Python 3 doesn't differentiate between int's and long's, so there is no 'L'. And unless you have a really good reason for using 2, you should be working with Python 3, anyway.
Reply


Messages In This Thread
question about train_test_split() - by fadi - Feb-28-2018, 08:14 AM
RE: question about train_test_split() - by mpd - Mar-05-2018, 07:37 PM
RE: question about train_test_split() - by fadi - Mar-06-2018, 07:18 AM
RE: question about train_test_split() - by mpd - Mar-06-2018, 12:40 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020