Commit Graph

26 Commits

Author SHA1 Message Date
Kyle Sunden a472f8c5de
Remove all usage of python2_3.py (#1939)
* Remove all usage of python2_3.py

Technically these functions were exported at the top level of the library, this removes them without warning... If we want to we can bring them back for there, but I honestly don't think its needed, as we are py3 only now and have been for multiple releases.

This may introduce a number of 'useless cast' or similar but those were always happening anyway

This PR brought to you by sed

* Update varname in hdf example to avoid collision with builtin

* Clean up some leftover comments surrounding imports of compat code

* Unnecessary string casts

* Additional unnecessary casts

* syntax error fix

* more unnecessary casts

* Yet more unnecessary casts
2021-08-01 21:43:32 -07:00
Kyle Sunden 6a59b7e5b5
Many unused import cleanups (#1935)
* Many unused import cleanups

Ignored some star imports, some vendored code in colorama, only looked within pyqtgraph the library, not e.g. examples

* SpinBox decimal imported with both import and from import
2021-07-31 07:35:23 -07:00
Martin Chase bcb629495c put new location in deprecation warning 2021-07-16 15:59:23 -07:00
Ogi Moore 27ad41a10c Add deprecation warning to MetaArray.__init__ 2021-06-23 21:27:21 -07:00
Ogi Moore d859cec95a Replace uses of tempfile.mktemp with tempfile.NamedTemporaryFile
This issue was flagged as a security issue in the static code analyzer
2021-05-31 21:06:16 -07:00
Ogi Moore 3ea92736b8 Do not use list comprehensions with any or all
python any and all are able to break early the moment they come across a
member of the iterable that meets the condition; but having a list
comprehension nested within breaks that ability to exit early, as the
list comprehension has to finish being constructed first before it can
be evaluated
2021-04-23 22:43:57 -07:00
Ogi Moore ff71b6be6b Add actual deprecation warnings 2021-02-11 21:34:02 -08:00
Luke Campagnola 5e971b646f update h5py deps in metaarray
- update h5py usage to support latest version
- bugfix in __getitem__ for fancy indexing
- code cleanup
2020-07-06 01:08:01 -07:00
Ognyan Moore ef4ca9e9ea Incorporated correction luke suggested 2019-11-21 08:46:25 -08:00
Ogi Moore 770ce06dc1
Revert "Allow MetaArray.__array__ to accept an optional dtype arg" 2019-11-21 08:42:44 -08:00
Ogi Moore 78e218fe6c
Merge pull request #360 from nfirvine/develop
Allow MetaArray.__array__ to accept an optional dtype arg
2019-11-20 22:17:18 -08:00
Ogi Moore 477feb777b import h5py.highlevel is deprecated, use import h5py instead 2019-11-20 21:54:56 -08:00
Luke Campagnola e58b7d4708 minor correction 2019-11-20 21:54:56 -08:00
Luke Campagnola c484c86417 don't modify info from v1 files, move info correction to hdf reading 2019-11-20 21:54:56 -08:00
Paul B. Manis ae61d3582e Py2/3 MetaArray adjustments, first pass 2019-11-20 21:54:56 -08:00
Kenneth Lyons faef56c3e7 Qulogic py3 fixes (#1073)
* py3k: Remove reduce calls.

* py3k: Remove compatibility sortList function.

Sorting by key has existed since Python 2.4.

* Remove unnecessary sys.path manipulation.

This file doesn't have any __main__ code to run anyway.

* Use context manager
2019-11-12 08:45:42 -08:00
2xB 8d2c16901b Merge master into develop (#981)
* Information is spelled with an r, even in comments
2019-08-16 20:16:01 -07:00
Luke Campagnola 2a56435475 MetaArray: make it possible to append multiple axis values
Example use case: taking an image stack where each frame has a time value AND a position. Previously we could only append new time values.
2017-09-28 09:09:17 -07:00
Nick Irvine 0e33ddc28b Allow MetaArray.__array__ to accept an optional dtype arg
Fixes #359
2016-07-20 16:47:07 -07:00
Chadwick Boulay 5a21d59538 A few small style changes to MetaArray.py 2016-04-24 13:38:19 -04:00
Chadwick Boulay 2eca4ed775 Set MetaArray._info after modifications during MetaArray.checkInfo().
Update MetaArray.prettyInfo() to print empty axes. Also fixed some spacing issues when number of elements had more digits in some axes than others (up to 5 digits).
2016-04-24 13:20:10 -04:00
Luke Campagnola 0976991efd Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
Luke Campagnola 753ac9b4c4 Squashed commit of the following:
commit ca3fbe2ff9
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Thu Aug 7 08:41:30 2014 -0400

    Merged numerous updates from acq4:
    * Added HDF5 exporter
    * CSV exporter gets (x,y,y,y) export mode
    * Updates to SVG, Matplotlib exporter
    * Console can filter exceptions by string
    * Added tick context menu to GradientEditorItem
    * Added export feature to imageview
    * Parameter trees:
        - Option to save only user-editable values
        - Option to set visible title of parameters separately from name
        - Added experimental ParameterSystem for handling large systems of
            interdependent parameters
        - Auto-select editable portion of spinbox when editing
    * Added Vector.__abs__
    * Added replacement garbage collector for avoiding crashes on multithreaded Qt
    * Fixed "illegal instruction" caused by closing file handle 7 on OSX
    * configfile now reloads QtCore objects, Point, ColorMap, numpy arrays
    * Avoid triggering recursion issues in exception handler
    * Various bugfies and performance enhancements
2014-08-07 09:03:26 -04:00
Luke Campagnola 50df2b2def dockarea, imageview, metaarray 2013-12-23 10:06:26 -05:00
Luke Campagnola 8c13a3e7e3 copy from acq4 2013-07-03 11:20:49 -04:00
Luke Campagnola af59296231 Reorganized directory structure to be more standard
Started new SVG exporter
Merged updates from ACQ4
2012-12-25 00:43:31 -05:00