1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Convert a numpy.ndarray to string(or bytes) and convert it back to numpy.ndarray

Discussão em 'Python' iniciado por Stack, Novembro 28, 2025.

  1. Stack

    Stack Membro Participativo

    I'm having a little trouble here,

    I'm trying to convert a numpy.ndarray to string, I've already done that like this:

    randomArray.tostring()


    It works, but I'm wondering if I can transform it back to a numpy.ndarray.

    What's the best way to do this?

    I'm using numpy 1.8.1

    Context: The objective is to send the numpy.ndarray as a message in rabbitmq (pika library)

    Continue reading...

Compartilhe esta Página