Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: convert array of numbers to byte array
Post: RE: convert array of numbers to byte array

that's not quite what I want. I want them as numbers not strings. So for instance for this small array of uint8 and then a uint16 : 14,54274 I want the bytes obtained to be: 14,2,212 I could do it pr...
adetheheat General Coding Help 3 2,803 Aug-13-2020, 04:19 PM
    Thread: convert array of numbers to byte array
Post: convert array of numbers to byte array

I have an array of numbers - some are 8 bits, some are 16 bit little endian. eg 1,120,340, 54238, 65132, How do I convert them to one byte array ? I know the offsets in the array where the 8bit numbe...
adetheheat General Coding Help 3 2,803 Aug-13-2020, 01:38 PM
    Thread: convert from csv row to 16 bit bytes
Post: convert from csv row to 16 bit bytes

I have a csv row like this: 1,5,14343,3456,6123,34002,4 etc I need to create a stream of bytes from it of size 16 bit - So I want the above portion of the array to end up being an array like this: ...
adetheheat General Coding Help 1 1,644 Feb-28-2020, 02:32 PM
    Thread: Outputs missing
Post: RE: Outputs missing

you only have item in state. In addition I think the word 'file' is reserved (I'm not sure though). You should have something like this: file = open(txt,"r") a=file.read() state = [] for line in a: ...
adetheheat General Coding Help 4 2,612 Feb-12-2020, 04:32 PM
    Thread: needed str around a file pathname to open it
Post: needed str around a file pathname to open it

I obtained a file pathname ending with .lst in the root dir like this: for file_path in Path(args.path).glob('**/*.lst'):and I wanted to open the file file_path but needed str(file_path) to do so: fo...
adetheheat General Coding Help 1 1,448 Feb-12-2020, 04:03 PM
    Thread: numpy.where array search for string in just one coordinate
Post: numpy.where array search for string in just one co...

I have the following array: [[ 258 16892 40056] [ 259 25647 40056] [ 260 25847 40056] [ 261 47339 259]]I want to search in it and find rows where just the first element == 259. This call will f...
adetheheat Data Science 1 2,284 Jan-09-2020, 05:28 PM
    Thread: stupid > comparison question
Post: RE: stupid > comparison question

oops it was a string - stupid 8 year olds mistake ! thanks anyway
adetheheat General Coding Help 2 2,900 Jan-11-2018, 01:04 PM
    Thread: stupid > comparison question
Post: stupid > comparison question

I have a list with a value of 4 at index 2. I compare this with a value of 200 to see if it is greater ... and strangely it says it is: eg print deltaList[2], thr2nd, deltaList[2] > thr2ndI get th...
adetheheat General Coding Help 2 2,900 Jan-11-2018, 12:22 PM

User Panel Messages

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