data matrix python

Discussion in 'Python' started by bbarbero@inescporto.pt, Oct 7, 2009.

  1. Guest

    Good morning all!

    I am trying to build a data matrix, but I am not able either to write
    to file with a proper structure nor to get the data from the matrix.

    I want to sort some music by similarity content, and I just have the
    indexes of the playlist like this:

    dm = numpy.array(songs)

    [0 4 2 1 3]
    [1 2 0 4 3]
    [2 1 0 4 3]
    [3 2 1 0 4]
    [4 0 1 2 3]

    Now, I want to keep the same format but with the names of the songs,
    something like this:

    Sort_dm.append(songlist(dm))

    ['100.mp3\n' '10008.mp3' '10005.mp3\n' '10001.mp3\n' '10006.mp3\n'
    '10001.mp3\n' '10005.mp3\n' '100.mp3\n' '10008.mp3' '10006.mp3\n'
    '10005.mp3\n' '10001.mp3\n' '100.mp3\n' '10008.mp3' '10006.mp3\n'
    '10006.mp3\n' '10005.mp3\n' '10001.mp3\n' '100.mp3\n' '10008.mp3'
    '10008.mp3' '100.mp3\n' '10001.mp3\n' '10005.mp3\n' '10006.mp3\n']

    But there is no way either I can access to the data... because there
    are strings, or save them in matrix format! I could not find anything
    in the documentation about this! any hint would be very welcome! thank
    you for your time!

    Best regards,
    Bea Mora


    ----------------------------------------------------------------
    This message was sent using IMP, the Internet Messaging Program.
    , Oct 7, 2009
    #1
    1. Advertising

  2. lallous Guest

    Hello

    Try re-asking your question in a more general way so that users w/o
    background information (about those classes and modules you're using) can
    help you with your problem.

    --
    Elias
    <> wrote in message
    news:...
    > Good morning all!
    >
    > I am trying to build a data matrix, but I am not able either to write to
    > file with a proper structure nor to get the data from the matrix.
    >
    > I want to sort some music by similarity content, and I just have the
    > indexes of the playlist like this:
    >
    > dm = numpy.array(songs)
    >
    > [0 4 2 1 3]
    > [1 2 0 4 3]
    > [2 1 0 4 3]
    > [3 2 1 0 4]
    > [4 0 1 2 3]
    >
    > Now, I want to keep the same format but with the names of the songs,
    > something like this:
    >
    > Sort_dm.append(songlist(dm))
    >
    > ['100.mp3\n' '10008.mp3' '10005.mp3\n' '10001.mp3\n' '10006.mp3\n'
    > '10001.mp3\n' '10005.mp3\n' '100.mp3\n' '10008.mp3' '10006.mp3\n'
    > '10005.mp3\n' '10001.mp3\n' '100.mp3\n' '10008.mp3' '10006.mp3\n'
    > '10006.mp3\n' '10005.mp3\n' '10001.mp3\n' '100.mp3\n' '10008.mp3'
    > '10008.mp3' '100.mp3\n' '10001.mp3\n' '10005.mp3\n' '10006.mp3\n']
    >
    > But there is no way either I can access to the data... because there are
    > strings, or save them in matrix format! I could not find anything in the
    > documentation about this! any hint would be very welcome! thank you for
    > your time!
    >
    > Best regards,
    > Bea Mora
    >
    >
    > ----------------------------------------------------------------
    > This message was sent using IMP, the Internet Messaging Program.
    lallous, Oct 8, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lvcargnini

    Matrix composed by two matrix

    lvcargnini, Jul 4, 2006, in forum: VHDL
    Replies:
    3
    Views:
    2,651
    Jonathan Bromley
    Jul 5, 2006
  2. Holgerson

    Matrix*Vector and Vector*Matrix

    Holgerson, Oct 25, 2007, in forum: C++
    Replies:
    3
    Views:
    402
    Holgerson
    Oct 26, 2007
  3. Terry Reedy
    Replies:
    0
    Views:
    544
    Terry Reedy
    Apr 2, 2009
  4. Robert Kern
    Replies:
    0
    Views:
    583
    Robert Kern
    Apr 2, 2009
  5. DebbieD

    Data Grid or Data Matrix...

    DebbieD, Oct 26, 2003, in forum: ASP General
    Replies:
    4
    Views:
    122
    Bob Barrows
    Oct 26, 2003
Loading...

Share This Page