Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Reading empty or nan array
Forum Updated to NodeBB v4.3 + New Features

Reading empty or nan array

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    ukpyqt
    wrote on 15 May 2014, 12:41 last edited by
    #1

    After having done to convert the empty array into float using numpy, still the output shows nan on the array, not sure where I am doing the mistake, please help me fix it , thanks in advance...

    @def loadCsv(self, fileName):
    tempVar = pd.read_csv(fileName, usecols=[5])
    irItems = np.array(tempVar)
    irItems[np.where(irItems == '')] = '0'
    irItems.astype(np.float)

        print(irItems)@
    

    [[ nan]
    [ nan]
    [ nan]
    ...,
    [ 2.69350944e+08]
    [ 2.69964736e+08]
    [ nan]]

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 15 May 2014, 13:01 last edited by
      #2

      Hi,

      How is this question related to Qt ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • U Offline
        U Offline
        ukpyqt
        wrote on 15 May 2014, 13:10 last edited by
        #3

        Hi SGaist,

        I have been working in Qt, where in I got stuck in this routine, may someone will help me to fix this, thanks

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 15 May 2014, 13:13 last edited by
          #4

          The thing is, with the code you are giving here, there's absolutely no relation with any Qt type, class or function. Thus my current guess is that it's python only code for which you should rather ask on a python forum

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            qxoz
            wrote on 15 May 2014, 13:25 last edited by
            #5

            We already have C++ Gurus forum,
            probably we should create another Python Gurus forum to avoid this kind of situation?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 15 May 2014, 13:33 last edited by
              #6

              Not a bad idea since there's PySide and PyQt

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • U Offline
                U Offline
                ukpyqt
                wrote on 15 May 2014, 13:55 last edited by
                #7

                Thanks guys...Will look for appropriate forums...

                1 Reply Last reply
                0

                1/7

                15 May 2014, 12:41

                • Login

                • Login or register to search.
                1 out of 7
                • First post
                  1/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved