[ANN] PyDSTool 0.88 -- dynamical systems modeling tools

2009-12-28 Thread Rob Clewley
A new release of the dynamical systems modeling toolbox PyDSTool is
available from Sourceforge:
http://www.sourceforge.net/projects/pydstool/

Highlights from the release notes:

 * Cleanup of global imports, especially: entire numpy.random and
linalg namespaces no longer imported by default
 * Added support for 'min' and 'max' keywords in functional
specifications (for ODE right-hand sides, for instance)
 * Optimization tools from third-party genericOpt (included with
permission) and improved parameter estimation examples making use of
this code
 * Numerical phase-response calculations now possible in PRC toolbox
 * Fully-fledged DSSRT toolbox for neural modeling (see wiki page)
 * New tests/demonstrations in PyDSTool/tests
 * Major improvements to intelligent expr2func (symbolic - python
function conversion)
 * Improved compatibility with cross-platform use and with recent
python versions and associated libraries
 * Added many minor features (see timeline on Trac
http://jay.cam.cornell.edu/pydstool/timeline)
 * Fixed many bugs and quirks (see timeline on Trac
http://jay.cam.cornell.edu/pydstool/timeline)

This is mainly a bugfix release in preparation for a substantial
upgrade at version 0.90, which will have a proper installer, unit
testing, symbolic expression support via SymPy, and greatly improved
interfacing to legacy ODE integrators. These features are being
actively developed in 2009/2010.

For installation and setting up, please carefully read the
GettingStarted page at our wiki for platform-specific details:
http://pydstool.sourceforge.net

Please use the bug tracker and user discussion list at Sourceforge to
report bugs or provide feedback. Code and documentation contributions
are always welcome.

Regards,
Rob Clewley
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: Mathematical Python Library

2008-04-07 Thread Rob Clewley
The closest thing so far is probably going to be a combination of the
numpy, scipy, and sympy libraries. The latter is the one with the most
functionality for solving equations algebraically, but is also the
least mature package at the moment. The first two also provide the
basic tools for calculating the nulls of a function (for instance) as
numerical approximations, provided you are able to write small scripts
to use those tools.

-Rob

On Mon, Apr 7, 2008 at 12:05 PM, mc [EMAIL PROTECTED] wrote:
 I'm looking for a library which can do mathematical stuff like
  solving  equations. Or calculation the nulls of a function and so on.
  Does anyone know one?

  Thanks in advance!
  --
  http://mail.python.org/mailman/listinfo/python-list




-- 
Robert H. Clewley, Ph. D.
Assistant Professor
Department of Mathematics and Statistics
Georgia State University
720 COE, 30 Pryor St
Atlanta, GA 30303, USA

tel: 404-413-6420 fax: 404-651-2246
http://www.mathstat.gsu.edu/~matrhc
http://brainsbehavior.gsu.edu/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Rob Clewley
You get None b/c that's what's being returned from your join strings
function. Your function already prints out the result and doesn't
return the joined strings a your usage case expects.

So either return the joined strings from your function and don't print
them inside the function, or vice versa. Besides, can't you just use

print .join(list_of_strings)

?

On Mon, Feb 23, 2009 at 2:22 PM, Gary Wood woody...@sky.com wrote:
 '''exercise to complete and test this function'''
 import string
 def joinStrings(items):
 '''Join all the strings in stringList into one string,
 and return the result. For example:
  print joinStrings(['very', 'hot', 'day'])
 'veryhotday'
 '''
 word = [items]
 for item in items:
  print (item, end='')


 def main():
 print(joinStrings(['very', 'hot','day']))
 print(joinStrings(['this', 'is','it']))
 print(joinStrings(['1', '2', '3', '4', '5']))

 main()

--
http://mail.python.org/mailman/listinfo/python-list


[JOB] Short-term python programming consultant - funds expire soon!

2009-03-10 Thread Rob Clewley
Dear Pythonistas,

Our open-source software project (PyDSTool) has money to hire an
experienced Python programmer on a short-term, per-task basis as a
technical consultant (i.e., no fringe benefits offered). The work can
be done remotely and will be paid after the satisfactory completion of
the objectives. The work must be completed by the end of April, when
the current funds expire. The basic work plan and design documents are
already laid out from previous work on these tasks, but the finer
details will be negotiable. We plan to pay approximately $2-3k per
task, depending on the exact code design and amount of time required.

Prospective consultants could be professionals or students but must
have proven experience with SWIG and both python and numpy distutils,
and be willing to write a short document about the completed work for
future maintenance purposes. We have a template for a simple contract
and invoices can be relatively coarse-grained. As an open-source
project, all contributed code will be BSD licensed as part of our
project, although it will retain attribution of your authorship. We
have two objectives for this work, which could be satisfied by two
individual consultants but more likely by one:

(1) This objective involves completing the implementation of automated
compilation of C code into DLLs. These DLLs are dynamically created
from a user's specification in python. The DLLs can be updated and
reloaded if the user changes specifications at the python level. This
functionality is crucial to providing fast solving of differential
equations using legacy solvers written in C and Fortran. This
functionality is relatively independent from the inner workings of our
project so there should be minimal overhead to completing this task.
We need to complete the integration of an existing code idea for this
objective with the main trunk of our project. The existing code works
as a stand-alone test for our C legacy solver but is not completed for
our Fortran legacy solver (so that numpy's distutils needs to be used
instead of python distutils) and needs to be integrated into the
current SVN trunk. The design document and implementation for the C
solver should be a helpful template for the Fortran solver.

(2) We need a setup.py package installer for our project that
automatically compiles the static parts of the legacy differential
equation solvers during installation according to the directory
structure and SWIG/distutils implementation to be completed in
objective (1). If the consultant is experienced with writing python
package installers, he/she may wish to negotiate working on a more
advanced system such as an egg installer.

PyDSTool (pydstool.sourceforge.net) is a multi-platform, open-source
environment offering a range of library tools and utilities for
research in dynamical systems modeling for scientists and engineers.

Please contact Dr. Rob Clewley (rclewley) at (@) the Department of
Mathematics, Georgia State University (gsu.edu) for more information.

-- 
Robert H. Clewley, Ph.D.
Assistant Professor
Department of Mathematics and Statistics
and Neuroscience Institute
Georgia State University
720 COE, 30 Pryor St
Atlanta, GA 30303, USA

tel: 404-413-6420 fax: 404-413-6403
http://www2.gsu.edu/~matrhc
http://brainsbehavior.gsu.edu/
--
http://mail.python.org/mailman/listinfo/python-list


Re: [JOB] Short-term python programming consultant - funds expire soon!

2009-03-10 Thread Rob Clewley
 Please see http://www.python.org/community/jobs/
 for where to post this most effectively.

OK, sorry, I hadn't seen that site before.

 Our open-source software project (PyDSTool) has money to hire an
 experienced Python programmer on a short-term, per-task basis as a
 technical consultant (i.e., no fringe benefits offered)

FYI I also discovered that the funds will in fact be available until
**early June** which I will correct in the posting to that jobs site.
Thanks,
Rob
--
http://mail.python.org/mailman/listinfo/python-list


pyconfig on 64-bit machines with distutils vs 32-bit legacy code

2009-03-21 Thread Rob Clewley
Hi,

I have a problem compiling legacy C code using distutils on a
colleague's 64 bit intel machine running linux. The legacy code is
linked to user-generated code from python and distutils is a
convenient platform independent way to call whatever compiler is
available to create a DLL as a python module via SWIG. My code works
fine on 32 bit machines, but on a 64 bit machine the error

/data/home/nwagner/local/lib/python2.5/pyport.h:734:2: #error
LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?).

was generated.

I looked this error up and found it referred to a bug in python about
pyconfig.h not being automatically adaptive when mixing 32-bit code
and 64-bit libraries. There were various vague references to solutions
and a supposed fix in python, but the posts were at least a couple of
years old and didn't make a lot of sense to me. I tried adding the
'-m32' option to the gcc call using extra_compile_args but that was
not enough. According to a different suggestion on a different mailing
list, I tried replacing pyconfig.h with a version that used 32-bit
settings for the size of LONG and the other 64-bit specific sizes.
That did not help at all.

The gcc call created from my PyDSTool package's code via distutils is
(slightly reformatted for easy reading):

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC
-I/data/home/nwagner/local/lib/python2.5/site-packages/numpy/core/include
-I/data/home/nwagner/local/lib/python2.5/site-packages/numpy/numarray
-I/data/home/nwagner/svn/PyDSTool/PyDSTool/tests
-I/data/home/nwagner/svn/PyDSTool/PyDSTool/integrator
-I/data/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp
-I/data/home/nwagner/local/include/python2.5
-c 
/data/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp/dop853_HHnet_vf_wrap.c
-o 
/data/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp/data/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp/dop853_HHnet_vf_wrap.o
-w -m32 -D__DOPRI__

Can anyone offer any advice as to what I might be missing or
misunderstanding? I assumed it would be possible to do this
compilation even if a 64 bit version of python has been installed on
this linux box.

I'm somewhat out of my depth talking about these internal gubbins so
please go easy on me.

Thanks in advance,
Rob
--
http://mail.python.org/mailman/listinfo/python-list


Re: pyconfig on 64-bit machines with distutils vs 32-bit legacy code

2009-03-22 Thread Rob Clewley
Thanks for replying, Martin.

I got my colleague (Nils) to run exactly the gcc call you described in
your post (see below for what he ran) but it only returns the
following:

/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp/dop853_HHnet_vf_wrap.c:124:20:
error: Python.h: Datei oder Verzeichnis nicht gefunden
/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp/dop853_HHnet_vf_wrap.c:2495:4:
error: #error This python version requires swigto be run with the
'-classic' option
In file included from
/home/nwagner/local/lib64/python2.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:61,
from
/home/nwagner/local/lib64/python2.6/site-packages/numpy/core/include/numpy/arrayobject.h:14,
from
/home/nwagner/local/lib64/python2.6/site-packages/numpy/numarray/numpy/libnumarray.h:7,
from
/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp/dop853_HHnet_vf_wrap.c:2758:
/home/nwagner/local/lib64/python2.6/site-packages/numpy/core/include/numpy/npy_common.h:71:2:
error: #error Must use Python with unicode enabled.

The command was

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC
-I/data/home/nwagner/local/lib/python2.5/site-packages/numpy/core/include
-I/data/home/nwagner/local/lib/python2.5/site-packages/numpy/numarray
-I/data/home/nwagner/svn/PyDSTool/PyDSTool/tests
-I/data/home/nwagner/svn/PyDSTool/PyDSTool/integrator
-I/data/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp
-I/data/home/nwagner/local/include/python2.5 -E -dD
/data/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp/dop853_HHnet_vf_wrap.c
-w -m32 -D__DOPRI__

Maybe Nils can pick up the thread from here.
Thanks,
Rob

On Sun, Mar 22, 2009 at 2:36 AM, Martin v. Löwis mar...@v.loewis.de wrote:
 /data/home/nwagner/local/lib/python2.5/pyport.h:734:2: #error
 LONG_BIT definition appears wrong for platform (bad gcc/glibc
 config?).


 Can anyone offer any advice as to what I might be missing or
 misunderstanding?

 You need to understand where the error comes from:
 1. what is the *actual* value of SIZEOF_LONG (it should be 4)?
 2. what is the actual value of LONG_BIT, and where does it come
   from? (it should be 32)

 To understand that better, I recommend to edit the command line
 of gcc in the following way (assuming you use gcc 4.x):
 1. replace -c with -E -dD
 2. remove the -o file option

 This will generate preprocessor output to stdout, which you then
 need to search for SIZEOF_LONG and LONG_BIT. Searching back for
 # number lines will tell you where the definition was made.

 If that doesn't make it clear what the problem is, post your
 findings here.

 Regards,
 Martin
--
http://mail.python.org/mailman/listinfo/python-list


ANN: PyDSTool 0.85 released

2007-07-11 Thread Rob Clewley
We have released an update to the PyDSTool dynamical systems and
modeling package at http://sourceforge.net/projects/pydstool.  There
are lots of minor improvements and fixes in this version, but a
powerful new feature is the support for user-defined functions for
continuation using PyCont.

We have also added some tools for basic phase-plane analysis,
calculation of phase response curves for oscillators, and support for
some special math functions.  Please see the release notes for more
details, and the documentation at http://pydstool.sourceforge.net.

We plan to continue to add features and improve our code over the
coming months, and we look forward to hearing feedback on our
progress.  In particular, contributions are very welcome.  Thanks
again to the Scipy, Numpy, Matplotlib, and SWIG developers for
facilitating our work!

-- The PyDSTool developers
-- 
http://mail.python.org/mailman/listinfo/python-list


New python module to simulate arbitrary fixed and infinite precision binary floating point

2008-08-10 Thread Rob Clewley
Dear Pythonistas,

How many times have we seen posts recently along the lines of why is
it that 0.1 appears as 0.10001 in python? that lead to
posters being sent to the definition of the IEEE 754 standard and the
decimal.py module? I am teaching an introductory numerical analysis
class this fall, and I realized that the best way to teach this stuff
is to be able to play with the representations directly, in particular
to be able to see it in action on a simpler system than full 64-bit
precision, especially when str(f) or repr(f) won't show *all* of the
significant digits stored in a float. The decimal class deliberately
avoids binary representation issues, and I can't find what I want
online.

Consequently, I have written a module to simulate the machine
representation of binary floating point numbers and their arithmetic.
Values can be of arbitrary fixed precision or infinite precision,
along the same lines as python's in-built decimal class. The code is
here:  http://www2.gsu.edu/~matrhc/binary.html

The design is loosely based on that decimal module, although it
doesn't get in to threads, for instance. You can play with different
IEEE 754 representations with different precisions and rounding modes,
and compare with infinite precision Binary numbers. For instance, it
is easy to learn about machine epsilon, representation/rounding error
using a much simpler format such as a 4-bit exponent and 6-bit
mantissa. Such a format is easily defined in the new module and can be
manipulated easily:

 context = define_context(4, 6, ROUND_DOWN)

 zero = context(0)
Binary(0, (4, 6, ROUND_DOWN))

 print zero  # sign, characteristic, significand bits
0  00

  zero.next()
Binary(0.001E-9, (4, 6, ROUND_DOWN))

 print zero.next()
0  01

 largest_denormalized = context('0  11')  # direct spec of the sign, 
 characteristic, and significand bits
 largest_denormalized
Binary(0.11E-6, (4, 6, ROUND_DOWN))

 largest_denormalized.as_decimal()
Decimal(0.015380859375)

 n01 = context(0.1)  # nearest representable is actually stored

 print n01, rounded to , n01.as_decimal()
0 0011 100110  rounded to 0.099609375

 Binary('-10111.001').as_decimal()
Decimal(-23.0078125)

 Binary('-10111.001', context).as_decimal() # not enough precision 
 in this context
Decimal(-23.)

 diff = abs(Binary('-10111.001') - Binary('-10111.001', context))
 diff
Binary(0.1E-6, (4, 6, ROUND_DOWN))

The usual arithmetic operations are permitted on these objects, as
well as representations of their values in decimal or binary form.
Default contexts for half, single, double, and quadruple IEEE 754
precision floats are provided. Binary integer classes are also
provided, and some other utility functions for converting between
decimal and binary string representations. The module is compatible
with the numpy float classes and requires numpy to be installed.

The source code is released under the BSD license, but I am amenable
to other licensing ideas if there is interest in adapting the code for
some other purpose. Full details of the functionality and known issues
are in the module's docstring, and many examples of usage are in the
accompanying file binary_tests.py (which also acts to validate the
common representations against the built-in floating point types). I
look forward to hearing feedback, especially in case of bugs or
suggestions for improvements.

-Rob

-- 
Robert H. Clewley, Ph. D.
Assistant Professor
Department of Mathematics and Statistics
Georgia State University
720 COE, 30 Pryor St
Atlanta, GA 30303, USA

tel: 404-413-6420 fax: 404-413-6403
http://www2.gsu.edu/~matrhc
http://brainsbehavior.gsu.edu/
--
http://mail.python.org/mailman/listinfo/python-list


Re: New python module to simulate arbitrary fixed and infinite precision binary floating point

2008-08-11 Thread Rob Clewley

 Is this related to minifloats?

 http://en.wikipedia.org/wiki/Minifloat


Strictly speaking, yes, although after a brief introduction to the
general idea, the entry on that page focuses entirely on the
interpretation of the values as integers. My code *only* represents
the values in the same way as the regular-sized IEEE 754 formats, i.e.
the smallest representable number is a fraction  1, not the integer
1. I haven't supplied a way to use my classes to encode integers in
this way, but it wouldn't be hard for someone to add that
functionality in a sub-class of my ContextClass.

Thanks for pointing out that page, anyway. I didn't know the smaller
formats had been given their own name.

-Rob
--
http://mail.python.org/mailman/listinfo/python-list


Re: floating point arithmetic

2008-08-26 Thread Rob Clewley
 I understand that due to different arithmetic used in floating points
 they are just approximations. Hence, 180/100=1 in my python interpreter.

No, that's not the reason you get 1, it's because the current version
of python does integer division by default. Try doing 180.0/100 or
including

from __future__ import division

at the top of your scripts before dividing your numbers.

 How can I tackle this problem of inaccurate floating point numbers?

There are few occasions for regular users to worry about the
inaccuracy of floating point, unless you are doing very technical
calculations at high precision. If you need decimals to be represented
perfectly in python (e.g. you are writing scripts for financial
applications), try importing the decimal package (look it up in the
python docs).

-Rob
--
http://mail.python.org/mailman/listinfo/python-list


ANN: updated release of PyDSTool dynamical systems package (version 0.83.2 patch #1)

2006-06-16 Thread Rob Clewley
Version 0.83.2 of PyDSTool has been released, and now includes a patchfor compilation of AUTO on Linux (as of 15th June).PyDSTool is an open-source project providing a range of dynamical
systems simulation and analysis tools. It supports both continuous-and discrete-time systems including ordinary differential equations,differential-algebraic equations, maps, and hybrid event-driven
systems. It also provides model building classes and templates forspecification of complex networks, including the manipulation ofsymbolic math expressions. Other features include enhancements ofSciPy and Numarray classes.
The sub-package PyCont provides native continuation and bifurcationanalysis tools (now including a low-level interface to AUTO).Included toolbox utilities provide template classes and functions for
scientific applications, including to systems biology and computationalneuroscience.Documentation and tutorial information can be found on the wiki:
http://pydstool.sourceforge.net
or download the package directly fromhttp://sourceforge.net/projects/pydstool
Your continuing feedback and code contributions are greatly appreciated. Please help us improve this project!Thanks for your attention,Rob Clewley, Erik Sherwood, Drew LaMar,Dept. of Mathematics and Center for Applied Mathematics,
Cornell University.

-- 
http://mail.python.org/mailman/listinfo/python-list

Re: urgent - Matplolib with IDLE!

2007-03-19 Thread Rob Clewley
Dear Ana,

I have the same problem with a similar setup (except Python 2.4.3) and
have tried the same solutions (BTW those steps really did used to work
on my machine using Python 2.3.5). In the short term you could either
try IPython (a proper solution to this problem, which returns me to
the prompt just fine after closing the figure) or try the following
quick and dirty fix with IDLE:

1) If your script does stuff other than define classes and functions,
put in a command that prevents it getting to the calculations (e.g.
insert a 1/0 line) or, for instance, turn all your calculations into
function calls that you can easily comment out (temporarily). Run your
script using F5 so that you just get the prompt.
3) Create an empty figure using pylab.figure() or whatever.
2) Close the figure and the IDLE console (command prompt window) that
opened when you ran the script (you have to say Yes when it asks about
killing a python process).
3) This leaves an orphaned python process which you have to clean up
later using your Task Manager, but ...
4) you can now continue to interact with any new IDLE console created
in the current session when you bring up new figures. i.e. uncomment
the parts of your script that actually do stuff and run it again.

At least that's a quick fix that's working for me while I await a
better answer too... Perhaps this hack will outrage someone's
sensibilities sufficiently that we'll hear of a better IDLE solution.

HTH,
Rob
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: matplotlib basic question

2007-04-19 Thread Rob Clewley
On 19 Apr 2007 16:13:43 -0700, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

  So, first off, what's up with the [matplotlib.lines.Line2D instance
  at 0x017C38C8] line that shows up after my plot command?  And second,
  when I call show(), a new figure pops up with my sin wave -- seems all
  right, yes? But I'm not given another  prompt in IDLE until or
  unless I close the figure that popped up with the show() call.
 This may not be strictly correct but  thats a reference to the plot
 instance which is subsequently passed to show().
 If you don't want to see it put a semicolon at the end of your command
 eg. plot(range(5));

My understanding is that the semicolon trick is specific to IPython,
and does not work in IDLE. I don't know about in other environments.
You can just assign the list of returned plot objects to a variable to
make it invisible at the command line although these return values
(like all return values) are not shown in the command window (i.e.
passed to stdout) if they are returned from calls made in a script.

 The issue with IDLE is to due with lack of connection between the
 python interpreter event loop and the event loop of matplotlib (I
 think). For me the solution was to install the ipython shell (http://
 ipython.scipy.org/moin/). If you run ipython with the -pylab flag then
 you can matplotlib interactively. For example

 plot(range(5),'bo')
 show()
 clf()
 plot([1,2,3,4,5],range(0,10,2),'r-')
 (no need for another show() command since the graphics display is
 already visible ... unless of course I deleted it in between plot
 commands)

The OP appears to be using IDLE, for which the things to try are:

In site-packages/matplotlib/backends/backend_tkagg.py uncomment the
line #os.environ['PYTHONINSPECT'] = '1'

Set interactive=True in share/matplotlib/.matplotlibrc

Start IDLE with the -n flag

In site-packages/matplotlib/backends/backend_tkagg.py comment out the line

  Tk.mainloop()

in the function show

-Rob
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: PyDSTool v0.83.3 released

2006-09-23 Thread Rob Clewley
We are pleased to announce version 0.83.3 of our open-source
simulation, modeling, and analysis package PyDSTool. New features
include improved graphical capabilities in the PyCont bifurcation and
continuation sub-package and its interface with AUTO, and better
support for domain  bound enforcement on state variables and
parameters. There are several bug fixes and general improvements to
the API in this release too.

Please see http://pydstool.sourceforge.net for details and documentation.

Regards,

  Rob, Drew, and Erik.
  Center for Applied Mathematics,
  Cornell University.

 **

PyDSTool is an integrated simulation, modeling and analysis package
for dynamical systems, written in Python (and partly in C). It is
being developed at Cornell University, and the source code is
available under the terms of the BSD license. PyDSTool runs on Linux,
Windows, and Macs, and aims to have a minimal number of package
dependencies. Currently, it requires (old) SciPy, Numarray, and
Matplotlib.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: PyDSTool now compatible with numpy 1.0.1, scipy 0.5.2 and 64-bit CPUs.

2007-02-20 Thread Rob Clewley
We are pleased to announce version 0.84 of PyDSTool, an open-source
dynamical systems simulation, modeling, and analysis package.

This long-overdue release is primarily intended to bring existing
PyDSTool functionality up to date with the latest numpy and scipy releases
(previous versions required scipy 0.3.2, numarray, numeric, etc).
Also, PyDSTool is now compatible with 64-bit CPUs.

While we have added a few new features and made several fixes, major
improvements to functionality are in the pipeline for version 0.90.

Please see http://pydstool.sourceforge.net for release notes and documentation,
and http://sourceforge.net/projects/pydstool for downloading. As ever, please
send us feedback if you have any problems with this new release or ideas and
code contributions for future releases.

Regards,

  Rob, Erik, and Drew.
  Center for Applied Mathematics,
  Cornell University.

 **

PyDSTool is an integrated simulation, modeling and analysis package
for dynamical systems, written in Python (and partly in C). It is
being developed at Cornell University, and the source code is
available under the terms of the BSD license. PyDSTool runs on Linux,
Windows, and Macs, and aims to have a minimal number of package
dependencies.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: PyDSTool now compatible with numpy 1.0.1, scipy 0.5.2 and 64-bit CPUs.

2007-03-02 Thread Rob Clewley
Mike,

Yes, that is a pretty fair description of our support for symbolics
using Python's own inheritance. Our ModelSpec classes provide only an
elementary form of inheritance, polymorphism and type checking. We
hope to expand our existing support for hybrid/DAE systems at the
level of our ModelSpec model-building tools. All ideas and code
contributions are welcome!

Cheers,
Rob
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: PyDSTool now compatible with numpy 1.0.1, scipy 0.5.2 and 64-bit CPUs.

2007-03-05 Thread Rob Clewley
This kind of comment comes up often, so I think it's worth spelling
out a response that will persist on the web and can appear in our FAQ.

I have a different and admittedly limited view of hybrid systems as
part of dynamical systems theory. In principle, I would love to have
time to write an interface to something like Modelica, but PyDSTool
isn't intended as an industrial-scale simulation package: it is
intended for applied dynamical systems research involving small
systems that people want to analyze with tools like bifurcation theory
and parameter estimation. I also want to switch components in and out
of a model with minimum overhead as part of model estimation and
parameter estimation routines that remain an open research area.
Partly for this reason I don't want to start depending on large
external packages, most features of which people may never be needed.
Given my present purposes the overhead of writing an interface is a
demanding sink of my time when basic (essentially prototype) tools
suffice in the short term. That is also why I am not planning a
graphical UI at this time. (The related DsTool and XPP packages
already have GUIs.)

I appreciate the idea of outsourcing to take advantage of good work in
areas such as yours.  I hope to step up to that bar later on as part
of an ongoing research project connected to me, which involves
studying the mechanisms of locomotion in insects. There are other
mechanical simulation packages that I would like to interface to (most
are commercial), but on close inspection it turns out there's a lot of
very technical issues involved -- although at least modelica is open
source! Sorry to be taking a short-term view here (I try to avoid
that), but we're just a couple of guys trying to concentrate on our
day jobs...

Rob
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Box plot in Python

2007-03-15 Thread Rob Clewley
Matplotlib supports boxplots in a very straightforward fashion and is
reasonably documented (just google it!) I actually just submitted a
patch for extra boxplot features in matplotlib, which you can find on
the sourceforge patch tracker.
-Rob
-- 
http://mail.python.org/mailman/listinfo/python-list


Unexpected behavior with dictionary keys containment and a user-defined class

2009-01-12 Thread Rob Clewley
Hi, the short version of my question is: when is a dictionary's
__contains__ method behavior different to using the 'in' idiom?
(because I have an example of a difference in my code).

Longer version: I have a user-defined class with a few overrides of
special methods, particularly __eq__ and __ne__. I also have a
dictionary keyed by instances of these classes, and I'm confused about
the unexpected behavior trying to test whether an instance is in the
dictionary's keys. The instance is i and the dictionary is d. I have
been using the idiom

i in d

which I understood to be the pythonic way to test the keys, but it
doesn't work. However, when I debug my code I see the instance in the
list of keys, and in fact

i in d.keys()  and  d.keys()[10] == i

both return True. But

d.__contains__(i)
d.has_key(i)
d.keys()[10] is i

return False. I put a print statement in my class's __eq__ method and
it is being called. It tests equality of some of my class instance's
attributes. I didn't realize there was any situation where you could
expect different results from   i in d   versus   i in d.keys()   --
am I misunderstanding something?

I'm not sure what other details to provide! Thanks a lot,
Rob
--
http://mail.python.org/mailman/listinfo/python-list


Re: Unexpected behavior with dictionary keys containment and a user-defined class

2009-01-12 Thread Rob Clewley
 Hi, the short version of my question is: when is a dictionary's
 __contains__ method behavior different to using the 'in' idiom?
 (because I have an example of a difference in my code).

 Never.

Yes, sorry, I managed to summarize the long version incorrectly :)

 Well, the only conclusion is that dict uses the hash of an object to test
 containment while lists use id.

Great, thanks. I think a copy of my object has been made so that it
doesn't hash to the same thing. I'll write a __hash__ as suggested in
the other post. I forgot all about dictionary hashing for some
reason...

-Rob
--
http://mail.python.org/mailman/listinfo/python-list


Re: 4 hundred quadrillonth?

2009-05-21 Thread Rob Clewley
On Thu, May 21, 2009 at 8:19 PM, Gary Herron gher...@islandtraining.com wrote:
 MRAB wrote:

 Grant Edwards wrote:

 On 2009-05-21, Christian Heimes li...@cheimes.de wrote:

 seanm...@gmail.com schrieb:

 The explaination in my introductory Python book is not very
 satisfying, and I am hoping someone can explain the following to me:

 4 / 5.0

 0.80004

 4 / 5.0 is 0.8. No more, no less. So what's up with that 4 at the end.
 It bothers me.

 Welcome to IEEE 754 floating point land! :)


FYI you can explore the various possible IEEE-style implementations
with my python simulator of arbitrary floating or fixed precision
numbers:

http://www2.gsu.edu/~matrhc/binary.html
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ODE, GUI, plotter in Python

2009-06-17 Thread Rob Clewley
There was just an announcement on this list and the scipy list for
PyLab_Works, which sounds exactly like what you're looking for. I
would not recommend starting over with a new simulator at this point.
-Rob

On Tue, Jun 16, 2009 at 12:00 PM, Alashaib...@ymail.com wrote:
 Hello everyone.

 I am starting on implementing a simulator using python, and since it's
 the first time I code in python would appreciate a few pointers:

 The simulator will use a coupled ODE for the most part of the
 simulation, I plan to use scipy. (Anything considered faster/better
 than scipy for solving coupled ODEs? )

 I plan for a GUI program with network graph plotting. I am leaning
 towards using Qt for the GUI (internet forums seem to recommend it,
 anyone got other preferences? )

 Since the GUI application will contain few buttons and a plot, I am
 planning to implement matplotlib into the GUI. But does anyone know if
 matplotlib allows for interaction with the graph plot? (say for a
 network simulation, allowing to right click on nodes and disable them
 for instance, or alter some other properties of nodes and/or links
 across them).

 I am just starting out, hence I'd rather get some advice and experiment
 a bit for my self as I go along.

 Thank you.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: looking for best solutions for tracking projects and skills

2013-10-12 Thread Rob Clewley
I don't know about civic hacking, but Trello is a free online tool to
track high level aspects of collaborative projects. It is somewhat
focused on a to do planning perspective. But with the customizable
columns, labels, and checklists associated with items in the view I
think you might be able to track static info like skills.

-Rob

On Fri, Oct 11, 2013 at 11:09 PM, Jason Hsu jhsu802...@gmail.com wrote:
 I realize this is off-topic, but I'm not sure what forum is best for asking 
 about this.  I figure that at least a few of you are involved in civic 
 hacking groups.

 I recently joined a group that does civic hacking. (Adopt-A-Hydrant is an 
 example of civic hacking.)

 We need a solution for tracking projects and the skills needed for the 
 projects (such as Ruby on Rails, Python, Drupal, Javascript, etc.).

 I'd like to hear from those of you in similar groups that have a great system 
 for tracking projects. Is there an in-house solution you use, or is there 
 something else available?
 --
 https://mail.python.org/mailman/listinfo/python-list



-- 
Robert Clewley, Ph.D.
Assistant Professor
Neuroscience Institute and
Department of Mathematics and Statistics
Georgia State University
PO Box 5030
Atlanta, GA 30302, USA

tel: 404-413-6420 fax: 404-413-5446
http://neuroscience.gsu.edu/rclewley.html
-- 
https://mail.python.org/mailman/listinfo/python-list


Is there existing code to log-with-bells-on for runtime algorithm diagnostics?

2015-04-21 Thread Rob Clewley
Hi,

I'm in need of a system for logging the step-wise results and
diagnostic metadata about a python function implementation of an
algorithm that I'm developing. The specific algorithm is not of great
consequence except that it's for scientific computing and may produce
large (e.g., '00s or maybe '000s, but not big data scale) amounts of
intermediate numerical data that can be complex to understand when
debugging its progress.

In fact, I'm trying to build a general purpose tool for exploring the
inner workings of numerical algorithms for teaching and learning
purposes, e.g. for graduate student training or for figuring out
parameter choices in difficult applications.

I want to be able to insert commands inside of the loops that log
certain variable states, completed stages of the algorithm (assume
it's hierarchical), text warnings, and possibly even 'pointers' to
graphical output objects of some of the intermediate data (e.g.
matplotlib object handles for lines, points). Then I can trace the
work done afterwards or step through the process in an IDE debugger
and make interactive calls to access recent steps, plot certain
relationships in the current state, etc. The basic logger's levels
of output don't really apply here. I at least want categories, if not
hierarchical sub-categories.

I don't think the built-in logger is sophisticated enough for this,
being a flat record of freeform text AFAIU, but the API looks
appealing.

I'm considering an in-memory sqlite DB to store structured records at
any logged step, and an accompanying dictionary to store references to
any python object metadata, keyed by a unique ID in the DB log. Then
I'd write an API for it that resembles the logger's.

It's not super hard for me to write my own thing here, but I'm
wondering if anyone has come across any existing solutions in this
vein, or has any advice before I go further in designing a solution? I
can't really believe that no-one has attempted this before, but it's
been really hard to find any existing work through online search.

Thanks,
Rob
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [SciPy-User] Is there existing code to log-with-bells-on for runtime algorithm diagnostics?

2015-04-21 Thread Rob Clewley
All of these ideas and links are very helpful, thank you!
-Rob
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [SciPy-User] Is there existing code to log-with-bells-on for runtime algorithm diagnostics?

2015-05-06 Thread Rob Clewley
Just to follow up on this thread, for interested readers' future reference...

On Tue, Apr 21, 2015 at 4:22 PM, Robert Kern robert.k...@gmail.com wrote:
 On Tue, Apr 21, 2015 at 8:02 PM, Rob Clewley rob.clew...@gmail.com wrote:
 In fact, I'm trying to build a general purpose tool for exploring the
 inner workings of numerical algorithms for teaching and learning
 purposes, e.g. for graduate student training or for figuring out
 parameter choices in difficult applications.

 The term you want to search for is structured logging.

 http://www.structlog.org/en/stable/
 http://eliot.readthedocs.org/en/stable/
 https://twiggy.readthedocs.org/en/latest/logging.html#structured-logging
 http://netlogger.lbl.gov/


I posted a new blog entry about my prototypical diagnosis and
visualization tools for python numerical algorithms, built over
matplotlib:
http://robclewley.github.io/logging-and-diagnostic-tools-for-numeric-python-algorithms/

They utilize structlog, and I hooked up a noSQL DB (tinydb) to the
logging to enable search capabilities of the log post-mortem. Comments
and PRs most welcome.

Thanks to everyone for the pointers.
-Rob
-- 
https://mail.python.org/mailman/listinfo/python-list