|
From: Glen S. <gle...@gm...> - 2008-06-04 02:01:34
|
Hi, I'm quite new to LabPython and am having trouble getting my program to work when compiled and called from LabVIEW. LabVIEW loads, compiles and sends variables to the program without problem but the program won't get past the first function. The function uses numpy routines and the only thing I can think of is that maybe there's a problem with using numpy and scipy in LabVIEW. Does anyone know if this is the case? Thanks, Glen |
|
From: Rolf K. <rol...@ci...> - 2008-06-04 05:44:41
|
Hi Glen, I'm quite new to LabPython and am having trouble getting my program to work when compiled and called from LabVIEW. LabVIEW loads, compiles and sends variables to the program without problem but the program won't get past the first function. The function uses numpy routines and the only thing I can think of is that maybe there's a problem with using numpy and scipy in LabVIEW. Does anyone know if this is the case? Indeed it is. I believe it is not so much the numpy itself if I remember correctly but the fact that I couldn't see an easy way of supporting numpy (and other optional packages) datatypes in my C binding without compiling those packages into LabPython itself. If you look at the mailing archive there was a similar inquiry a few months back and the solution was to use normal numeric datatype by casting instead and live with the implicit conversion this will cause. Rolf Kalbermatter |
|
From: Luc E. <luc...@en...> - 2008-06-04 08:45:02
|
Hi, I think I was the person who had trouble with numpy... Indeed, when I cast all my variables to python 'native' types such as 'list', then I don't get into trouble. best regards, luc > Hi Glen, > > I'm quite new to LabPython and am having trouble getting my program to > work > when compiled and called from LabVIEW. LabVIEW loads, compiles and sends > variables to the program without problem but the program won't get past > the > first function. The function uses numpy routines and the only thing I can > think of is that maybe there's a problem with using numpy and scipy in > LabVIEW. Does anyone know if this is the case? > > Indeed it is. I believe it is not so much the numpy itself if I remember > correctly but the fact that I couldn't see an easy way of supporting numpy > (and other optional packages) datatypes in my C binding without compiling > those packages into LabPython itself. > > If you look at the mailing archive there was a similar inquiry a few > months > back and the solution was to use normal numeric datatype by casting > instead > and live with the implicit conversion this will cause. > > Rolf Kalbermatter > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________________________ > LabPython-Users mailing list > Lab...@li... > https://lists.sourceforge.net/lists/listinfo/labpython-users > |
|
From: Rolf K. <rol...@ci...> - 2008-06-04 19:45:28
|
Hi Luc > I think I was the person who had trouble with numpy... > Indeed, when I cast all my variables to python 'native' types > such as 'list', then I don't get into trouble. I recently looked into this and I have a problem to see a crash as you would say it does. I tried it in LabVIEW 6.0.2 and with Python 2.5.2 as well as with LabVIEW 8.0.1 and I simply get an error 1048 from the script node back. I'm using labpython 1.2.2 as available from sourceforge download. Can you give me some more details about your system? Rolf Kalbermatter |
|
From: Glen S. <gle...@gm...> - 2008-06-04 21:59:45
|
Hi everyone, So numpy and scipy functions can be used as long as native data types are used? That may cause some problems since I am trying to perform matrix operations. I am using LabVIEW 8.20 with python 2.5.2 and labpython 1.2.2 on Windows XP. I am trying to pass a 2D array of floats to python. Glen 2008/6/5 Rolf Kalbermatter <rol...@ci...>: > Hi Luc > > > I think I was the person who had trouble with numpy... > > Indeed, when I cast all my variables to python 'native' types > > such as 'list', then I don't get into trouble. > > I recently looked into this and I have a problem to see a crash as you > would say it does. > > I tried it in LabVIEW 6.0.2 and with Python 2.5.2 as well as with > LabVIEW 8.0.1 and I simply get an error 1048 from the script node > back. I'm using labpython 1.2.2 as available from sourceforge download. > > Can you give me some more details about your system? > > Rolf Kalbermatter > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > LabPython-Users mailing list > Lab...@li... > https://lists.sourceforge.net/lists/listinfo/labpython-users > |
|
From: Rolf K. <rol...@ci...> - 2008-06-05 05:36:29
|
Hi Glen So numpy and scipy functions can be used as long as native data types are used? That may cause some problems since I am trying to perform matrix operations. I am using LabVIEW 8.20 with python 2.5.2 and labpython 1.2.2 on Windows XP. I am trying to pass a 2D array of floats to python. It should be possible. The way I solved arrays in LabPython was to treat them as lists. Consequently 2D arrays are lists of lists. It is not very efficient but Python does even in 2.5 not give you an exported array C API with which I could retrieve any information from a numpy array, despite the fact that the Python core does know an array datatype. It would be possible to add something like that to LabPython by making use of the numpy extension and its exported C API but at the time I was developing LabPython numpy was just in its infancy taking over from its predecessor the numerical library. That API seemed not at all stable to me at that point and making LabPython depend only softly on it (meaning it would still work but without support of numpy datatypes) would also be some serious thinkering. I may take a look how numpy interfaces with Python to solve the array interface issue but to do it right would be a majour undertaking and I have a real job to do that pays the bills. Rolf Kalbermatter |
|
From: Luc E. <luc...@en...> - 2008-06-05 08:56:03
|
Hi Rolf, actually, it turns out that when I get the 'python' scripting node from the OpenG panel of the 'command selector' I still get a crash (I select the Python scripting node, open its diagram and copy the scripting panel to my own VI). However, I just found that if I get a 'generic' scripting node from 'math'>'scripts and formulas'>'scipting nodes'> 'matlab scripting node' (This is a translation from the french version of Labview) and I set the scripting engine to Python, then I don't get a crash anymore, and I obtain the same error as you ! This is rather weird, but I think the second method solves rather well my issues with the python scripting node. Thank you very much for your kind help, luc > Hi Luc > >> I think I was the person who had trouble with numpy... >> Indeed, when I cast all my variables to python 'native' types >> such as 'list', then I don't get into trouble. > > I recently looked into this and I have a problem to see a crash as you > would say it does. > > I tried it in LabVIEW 6.0.2 and with Python 2.5.2 as well as with > LabVIEW 8.0.1 and I simply get an error 1048 from the script node > back. I'm using labpython 1.2.2 as available from sourceforge download. > > Can you give me some more details about your system? > > Rolf Kalbermatter > |
|
From: Luc E. <luc...@en...> - 2008-06-05 09:00:14
|
Hi all, I would like to add my vote to support the idea to add a numpy interface for Labpython! This would enhance greatly this piece of software since numpy has really become the standard for numerical stuff in python, and I suppose many users of Labpython are using python as a 'matlab' replacement. Thank you for all the hard work, Gratefully, luc > Hi Glen > > So numpy and scipy functions can be used as long as native data types are > used? That may cause some problems since I am trying to perform matrix > operations. I am using LabVIEW 8.20 with python 2.5.2 and labpython 1.2.2 > on Windows XP. I am trying to pass a 2D array of floats to python. > > It should be possible. The way I solved arrays in LabPython was to treat > them as lists. Consequently 2D arrays are lists of lists. It is not very > efficient but Python does even in 2.5 not give you an exported array C API > with which I could retrieve any information from a numpy array, despite > the > fact that the Python core does know an array datatype. > > It would be possible to add something like that to LabPython by making use > of the numpy extension and its exported C API but at the time I was > developing LabPython numpy was just in its infancy taking over from its > predecessor the numerical library. That API seemed not at all stable to me > at that point and making LabPython depend only softly on it (meaning it > would still work but without support of numpy datatypes) would also be > some > serious thinkering. > > I may take a look how numpy interfaces with Python to solve the array > interface issue but to do it right would be a majour undertaking and I > have > a real job to do that pays the bills. > > Rolf Kalbermatter > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________________________ > LabPython-Users mailing list > Lab...@li... > https://lists.sourceforge.net/lists/listinfo/labpython-users > |
|
From: Glen S. <gle...@gm...> - 2008-06-05 22:40:21
|
Hi again, I would like voice my thanks for labpython as well, it's generally a great piece of software, it's just unfortunate that numpy support is not there since I was, as Luc said, using python/numpy/matplotlib as a matlab replacement. Cheers, Glen 2008/6/5 Luc Estebanez <luc...@en...>: > Hi all, > > I would like to add my vote to support the idea to add a numpy interface > for Labpython! This would enhance greatly this piece of software since > numpy has really become the standard for numerical stuff in python, and I > suppose many users of Labpython are using python as a 'matlab' > replacement. > > Thank you for all the hard work, > > Gratefully, > > luc > > > Hi Glen > > > > So numpy and scipy functions can be used as long as native data types are > > used? That may cause some problems since I am trying to perform matrix > > operations. I am using LabVIEW 8.20 with python 2.5.2 and labpython > 1.2.2 > > on Windows XP. I am trying to pass a 2D array of floats to python. > > > > It should be possible. The way I solved arrays in LabPython was to treat > > them as lists. Consequently 2D arrays are lists of lists. It is not very > > efficient but Python does even in 2.5 not give you an exported array C > API > > with which I could retrieve any information from a numpy array, despite > > the > > fact that the Python core does know an array datatype. > > > > It would be possible to add something like that to LabPython by making > use > > of the numpy extension and its exported C API but at the time I was > > developing LabPython numpy was just in its infancy taking over from its > > predecessor the numerical library. That API seemed not at all stable to > me > > at that point and making LabPython depend only softly on it (meaning it > > would still work but without support of numpy datatypes) would also be > > some > > serious thinkering. > > > > I may take a look how numpy interfaces with Python to solve the array > > interface issue but to do it right would be a majour undertaking and I > > have > > a real job to do that pays the bills. > > > > Rolf Kalbermatter > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > > http://sourceforge.net/services/buy/index.php_______________________________________________ > > LabPython-Users mailing list > > Lab...@li... > > https://lists.sourceforge.net/lists/listinfo/labpython-users > > > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > LabPython-Users mailing list > Lab...@li... > https://lists.sourceforge.net/lists/listinfo/labpython-users > |
|
From: Jim K. <jim...@gm...> - 2008-06-05 23:03:16
|
Hello All, I'm sure that Rolf would happily accept purchase orders for any new features that you would like ;) Cheers, -Jim On Thu, Jun 5, 2008 at 3:40 PM, Glen Shennan <gle...@gm...> wrote: > Hi again, > > I would like voice my thanks for labpython as well, it's generally a great > piece of software, it's just unfortunate that numpy support is not there > since I was, as Luc said, using python/numpy/matplotlib as a matlab > replacement. > > Cheers, > Glen > > 2008/6/5 Luc Estebanez <luc...@en...>: > > Hi all, >> >> I would like to add my vote to support the idea to add a numpy interface >> for Labpython! This would enhance greatly this piece of software since >> numpy has really become the standard for numerical stuff in python, and I >> suppose many users of Labpython are using python as a 'matlab' >> replacement. >> >> Thank you for all the hard work, >> >> Gratefully, >> >> luc >> >> > Hi Glen >> > >> > So numpy and scipy functions can be used as long as native data types >> are >> > used? That may cause some problems since I am trying to perform matrix >> > operations. I am using LabVIEW 8.20 with python 2.5.2 and labpython >> 1.2.2 >> > on Windows XP. I am trying to pass a 2D array of floats to python. >> > >> > It should be possible. The way I solved arrays in LabPython was to treat >> > them as lists. Consequently 2D arrays are lists of lists. It is not very >> > efficient but Python does even in 2.5 not give you an exported array C >> API >> > with which I could retrieve any information from a numpy array, despite >> > the >> > fact that the Python core does know an array datatype. >> > >> > It would be possible to add something like that to LabPython by making >> use >> > of the numpy extension and its exported C API but at the time I was >> > developing LabPython numpy was just in its infancy taking over from its >> > predecessor the numerical library. That API seemed not at all stable to >> me >> > at that point and making LabPython depend only softly on it (meaning it >> > would still work but without support of numpy datatypes) would also be >> > some >> > serious thinkering. >> > >> > I may take a look how numpy interfaces with Python to solve the array >> > interface issue but to do it right would be a majour undertaking and I >> > have >> > a real job to do that pays the bills. >> > >> > Rolf Kalbermatter >> > >> ------------------------------------------------------------------------- >> > Check out the new SourceForge.net Marketplace. >> > It's the best place to buy or sell services for >> > just about anything Open Source. >> > >> http://sourceforge.net/services/buy/index.php_______________________________________________ >> > LabPython-Users mailing list >> > Lab...@li... >> > https://lists.sourceforge.net/lists/listinfo/labpython-users >> > >> >> >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> LabPython-Users mailing list >> Lab...@li... >> https://lists.sourceforge.net/lists/listinfo/labpython-users >> > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > LabPython-Users mailing list > Lab...@li... > https://lists.sourceforge.net/lists/listinfo/labpython-users > > |