I have a C# (Mono) app that gets data from a sensor and passes it to a Python script for processing. It runs on a Raspberry Pi/Raspbian. The script is started at program initialization and is running in background waiting for data to be passed to it.
The data consists of 1000 samples, 32 bit double  (in total, 32 kbits). Currently I write the data in a file and pass the file path to the script. 
I was thinking of speeding up processing time by passing the data directly to the script, avoiding writing the file. However, I see that the number of characters of command line arguments is a limited.
Is there a solution to pass the data to the Python script by avoiding file writing/reading? I've read something about memory mapping, but I do not know if it's a solution.
Is there a solution to pass the data to the Python script by avoiding
  file writing/reading?

I can only think of two approaches:

You could open a socket for communication between both programs through localhost. The C# program would send data to that socket, and the Python program would read it.
Write both programs in Python or C#. The single program would capture
data and process it.


I've read something about memory mapping, but I do not know if it's a
  solution.

Memory mapping is about loading a file in memory, and once the work on it is finished, write it back at once. Since you have two different processes, I don't think it is applyable here.
Hope this helps.
How to pass large data to Python script?