testfixtures 6.0.2 released - important bug fix!

2018-05-02 Thread Chris Withers

Hi All,

I'm afraid I've found quite a serious regression in the 6.x series of 
testfixtures releases:


Objects that had neither __dict__ nor __slots__ would always be 
considered equal by compare().
I hit this comparing datetimes, but this would also affect types 
provides by extensions in other languages such as C or C++.
This did not affect built-in types such as dict, set, tuple and list as 
they have specific comparers provided that were not affects.


I've released 6.0.2 to fix this and would urge anyone using 6.0.0 or 
6.0.1 to upgrade as soon as possible.


The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


Re: Passing all pandas DataFrame columns to function as separate parameters

2018-05-02 Thread zljubisic
Thomas, thank you very very much, this was exactly what I needed.
Thanks again and best regards.
-- 
https://mail.python.org/mailman/listinfo/python-list


Masking using shapefiles

2018-05-02 Thread jorge . conrado



 Hi,

 I'm trying to make a mask using a shapefile of Brazil using the 
examplE:


 http://basemaptutorial.readthedocs.io/en/latest/clip.html


 I run my script and I had the messages:

 Traceback (most recent call last):
  File "mascarapy2.py", line 7, in 
from osgeo import gdal
  File 
"/home/conrado/anaconda3/lib/python2.7/site-packages/osgeo/__init__.py", 
line 21, in 

_gdal = swig_import_helper()
  File 
"/home/conrado/anaconda3/lib/python2.7/site-packages/osgeo/__init__.py", 
line 17, in swig_import_helper

_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: 
/home/conrado/anaconda3/lib/python2.7/site-packages/osgeo/../../.././libkea.so.1.4.7: 
undefined symbol: 
_ZN2H56H5FileC1ERKSsjRKNS_17FileCreatPropListERKNS_15FileAccPropListE



   Please, what can I do to solve this.

   Thanks,

   Conrado
--
https://mail.python.org/mailman/listinfo/python-list


[RELEASE] Python 3.7.0b4, final 3.7 beta, now available for testing

2018-05-02 Thread Ned Deily
Python 3.7.0b4 is the final beta preview of Python 3.7, the next feature
release of Python. Beta releases are intended to give you the
opportunity to test new features and bug fixes and to prepare your
projects to support the new feature release. We strongly encourage you
to test your projects with 3.7 during the beta phase and report issues
found to bugs.python.org as soon as possible. While the release is
feature complete entering the beta phase, it is possible that features
may be modified or, in rare cases, deleted up until the start of the
release candidate phase. Please keep in mind that this is a preview
release and its use is not recommended for production environments.
Attention macOS users: there is now a new installer variant for macOS
10.9+ that includes a built-in version of Tcl/Tk 8.6. This variant is
expected to become the default version when 3.7.0 releases. Check it out!

The next preview release will be the release candidate and is planned
for 2018-05-21 followed by the official release of 3.7.0, planned for
2018-06-15. You can find Python 3.7.0b4 and more information here:

https://www.python.org/downloads/release/python-370b4/

--
  Ned Deily
  n...@python.org -- []

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


Re: In numpy, why is it ok to do matrix.mean(), but not ok to do matrix.median()?

2018-05-02 Thread C W
Thanks, Chris. That makes sense. The len() example is great!

On Tue, May 1, 2018 at 10:37 PM, Chris Angelico  wrote:

> On Wed, May 2, 2018 at 12:22 PM, C W  wrote:
> > It's interesting how mean() can be implemented, but median() will break
> > other packages.
> >
> > So, the default way in numpy is to use functions, not methods?
> >
> > When I first learned Python, I was told to create an object and to play
> > around, there are methods for that object. List has list methods, tuple
> has
> > tuple methods, etc.
> >
> > Now, the default way in numpy is to use function instead of methods? I'm
> > confused. What happened to object-oriented programming?
>
> Even outside of numpy, a lot of Python uses functions, not methods.
> One good reason for this is that a function can accept a wide variety
> of data types as its argument; for instance, len() accepts many
> things, not just lists. Some things are done with methods, others with
> stand-alone functions. There are design choices each way.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


pyOpt Error on Tutorial 1

2018-05-02 Thread Maha
I am trying to run pyOpt tutorial located at http://www.pyopt.org/tutorial.html.
It will display the Objective function but the line
slsqp = pyOpt.SLSQP()
gives the following error.
AttributeError: 'module' object has no attribute 'SLSQP'

It is installed on the following folder
C:\Python27\pyOpt-1.2.0\pyOpt\pySLSQP

could you please tell me why this is not available in the environment. 
-- 
https://mail.python.org/mailman/listinfo/python-list