Awesome, thanks!
On Thu, May 11, 2023 at 1:47 PM Eryk Sun wrote:
> On 5/11/23, Jason Qian via Python-list wrote:
> >
> > in the Python, I have a array of string
> > var_array=["Opt1=DG","Opt1=DG2"]
> > I need to call c library and pass var_array as parameter
> > In the argtypes, how do I se
On 5/11/23, Jason Qian via Python-list wrote:
>
> in the Python, I have a array of string
> var_array=["Opt1=DG","Opt1=DG2"]
> I need to call c library and pass var_array as parameter
> In the argtypes, how do I set up ctypes.POINTER(???) for var_array?
>
> func.argtypes=[ctypes.c_void_p,ctyp
I’m not sure this is the shortest method, but you could set up two python
scripts to do the same thing and convert them to c using cython. I wouldn’t be
able to read the c scripts, but maybe you could.
Maybe someone else has a more direct answer.
Sent from my iPhone
> On May 11, 2023, at 10:
Hi,
Need some help,
in the Python, I have a array of string
var_array=["Opt1=DG","Opt1=DG2"]
I need to call c library and pass var_array as parameter
In the argtypes, how do I set up ctypes.POINTER(???) for var_array?
func.argtypes=[ctypes.c_void_p,ctypes.c_int, ctypes.POINTER()]
I
On 30Mar2016 22:53, Stephen Hansen wrote:
On Wed, Mar 30, 2016, at 10:34 PM, tdspe...@gmail.com wrote:
as you can see the option element was added third but is the first one
displayed.
Is this just standard - I am using Python 3.5
The order of items in dictionaries is based on the hash value
Stephen Hansen writes:
> On Wed, Mar 30, 2016, at 10:34 PM, tdspe...@gmail.com wrote:
>> as you can see the option element was added third but is the first one
>> displayed.
>>
>> Is this just standard - I am using Python 3.5
>
> The order of items in dictionaries is based on the hash value -- wh
On 31/03/2016 06:34, tdspe...@gmail.com wrote:
I am creating the following
aData = []
This is a Python list, not an array as the subject gives.
# get my data from database
for row in rows:
aData.append({row["tierid"]:"name":row["tiername"],"description":row["tierdesc"],"option":row["tie
On Wed, Mar 30, 2016, at 10:34 PM, tdspe...@gmail.com wrote:
> as you can see the option element was added third but is the first one
> displayed.
>
> Is this just standard - I am using Python 3.5
The order of items in dictionaries is based on the hash value -- which
while stable, should be consi
On Thu, Mar 31, 2016 at 4:34 PM, wrote:
> as you can see the option element was added third but is the first one
> displayed.
>
Dictionaries don't have any order to them, so yes, this is something
you'll have to accept.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
I am creating the following
aData = []
# get my data from database
for row in rows:
aData.append({row["tierid"]:"name":row["tiername"],"description":row["tierdesc"],"option":row["tieroption"],"price":str(row["tierprice"])}})
when I display the output the order the data was entered is not w
On Mar 14, 5:22 am, Matteo wrote:
> Re-posting in more simple and precise terms from a previous
> threadhttp://groups.google.it/group/comp.lang.python/browse_thread/thread/6...
>
> Problem:
> SWIG doesn't properly wrap c++ arrays of pointers, therefore when you
> try to call a c++ function which
Re-posting in more simple and precise terms from a previous thread
http://groups.google.it/group/comp.lang.python/browse_thread/thread/6dd7bd9a09b8a011/5119cf15ebfa38b8
Problem:
SWIG doesn't properly wrap c++ arrays of pointers, therefore when you
try to call a c++ function which requires them, a
S I wasn't sure if no one replied because a) this question was too
dumb or b) this question was too hard... it was definitely the former.
But I'll post the answer, anyway:
I forgot to keep in mind - when reading the documentation, assume that
a
>>> from numarray import *
occurred first.
So h
Hi. I have a very simple task to perform and I'm having a hard time
doing it.
Given an array called 'x' (created using the numarray library), is
there a single command that rounds each of its elements to the nearest
integer? I've already tried something like
>>> x_rounded = x.astype(numarray.Int
14 matches
Mail list logo