Re: How to turn this Matlab code into python

2022-11-08 Thread Dioumacor FAYE
From datenum to data_mjja=precp(:,ind_mjja);

Le lun. 7 nov. 2022 à 21:42, Christian Gollwitzer  a
écrit :

> Am 07.11.22 um 18:12 schrieb Dioumacor FAYE:
> > hi everyone
> > I wanted to transform this matlab code into python. If anyone can help me
> > please let me know.
> > load /media/lpaosf/Dioumss/maman/data/precip_chirps_SEN_1981-2018.mat
> > prcp = reshape(precip,[140*100,13879]);
> > dates = datenum(1981,1,1):datenum(2018,12,31);
> > date = datevec(dates);
> > ind_mjja=find(date(:,2)>=5 & date(:,2)<=8);% May to Aug (May(31)+
> June(30)+
> > July(31)+ August(31)= 123 days)
> > data_mjja=precp(:,ind_mjja);
> > data_mjja_res=reshape(data_mjja,14000,123,38);
>
> which part do you have trouble with?
>
>
> Christian
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 
Bien à vous,
---  -
  -
Dioumacor FAYE doctorant au  LPAOSF/ESP/UCAD/BP 5085 Dakar-Fann, Sénégal.
Tel labo: (00221) 33 825 93 64
Email: d.faye20171...@zig.univ.snTel:
+221773475098   +221783484308
Physicien en herbe
Pseudo Skype:   dioumacorfaye
-- 
https://mail.python.org/mailman/listinfo/python-list


VisPy 0.12 released

2022-11-08 Thread Lorenzo Gaifas
Hi all,

On behalf of the vispy contributors, I'm happy to announce vispy v0.12!
Here are the main highlights:

- Better attenuated_mip shader for Volume visuals, which scales
automatically based on contrast limits
- Instanced rendering in gloo, with some examples showcasing how to use it
- Allow setting array to `symbol` in `MarkersVisual`

Several bugs were also fixed, and documentation was updated. For a complete
changelog, see https://github.com/vispy/vispy/releases/tag/v0.12.0

What is VisPy?
--

VisPy is a Python library for interactive scientific visualization that is
designed to be fast, scalable, and easy to use. VisPy leverages the
computational power of modern Graphics Processing Units (GPUs) through the
OpenGL library to display very large datasets. Applications of VisPy
include:

High-quality interactive scientific plots with millions of points.
Direct visualization of real-time data.
Fast interactive visualization of 3D models (meshes, volume rendering).
OpenGL visualization demos.
Scientific GUIs with fast, scalable visualization widgets (Qt or Jupyter
Notebook via jupyter_rfb).

See the Gallery and many other example scripts on the VisPy website (
http://vispy.org/).

Upgrading
-

VisPy supports Python 3.x on Linux, Mac OSX, and Windows. VisPy's heavy use
of the GPU means that users will need to have modern and up-to-date video
drivers for their system. VisPy can use one of many backends, see the
documentation for details. We strive to keep backwards compatibility with
older versions of VisPy, but interfaces are still being designed to best
serve our users. As such, some things may have changed that break your
existing usage. See the Release Notes (linked below) for more information
on what has changed and contact the VisPy developers for help with any
problems you run into.

Links
-

GitHub: https://github.com/vispy/vispy
Website: http://vispy.org/
Gitter (for chat): https://gitter.im/vispy/vispy
Mailing list: https://groups.google.com/forum/#!forum/vispy
Release Notes: https://github.com/vispy/vispy/blob/main/CHANGELOG.md

Contributing


Help is always welcome. See our Contributor's Guide for information on how
you can participate:

https://vispy.org/dev_guide/contributor_guide.html

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


Re: What's tkinter doing in \Lib\site-packages\future\moves ?

2022-11-08 Thread DFS

On 11/7/2022 10:48 PM, DFS wrote:

3.9.13



Never mind.  User error - I didn't install it in the first place.





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


Re: How to manage python shebang on mixed systems?

2022-11-08 Thread jak

Il 07/11/2022 20:41, Chris Green ha scritto:

Schachner, Joseph (US)  wrote:

Maybe you can't do this, but I would suggest only running on the Python
3 systems. Refuse to jump through hoops for the Python 2 system. It is
years out of date.


Exactly! That's why I (OP) have only one system where this is a
problem. The system is my hosting provider's cPanel platform which is
running a very old Linux and, as I've said has only python 2.

I can ask for python 3 on their system but I suspect that my voice is
a very tiny one and there are higher priority things to get done.



Perhaps this is because you speak to them about the problems of
compatibility, try to speak to them about power, speed and performance,
instead. ;-D

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


Re: How to turn this Matlab code into python

2022-11-08 Thread Christian Gollwitzer

Am 08.11.22 um 09:01 schrieb Dioumacor FAYE:

From datenum to data_mjja=precp(:,ind_mjja);


I think the code filters data based on calendar dates. I'd guess that 
you can do that most easily with pandas.


https://pandas.pydata.org/docs/user_guide/timeseries.html

Christian


Le lun. 7 nov. 2022 à 21:42, Christian Gollwitzer  a
écrit :


Am 07.11.22 um 18:12 schrieb Dioumacor FAYE:

hi everyone
I wanted to transform this matlab code into python. If anyone can help me
please let me know.
load /media/lpaosf/Dioumss/maman/data/precip_chirps_SEN_1981-2018.mat
prcp = reshape(precip,[140*100,13879]);
dates = datenum(1981,1,1):datenum(2018,12,31);
date = datevec(dates);
ind_mjja=find(date(:,2)>=5 & date(:,2)<=8);% May to Aug (May(31)+

June(30)+

July(31)+ August(31)= 123 days)
data_mjja=precp(:,ind_mjja);
data_mjja_res=reshape(data_mjja,14000,123,38);


which part do you have trouble with?


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






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


Re: What to use for finding as many syntax errors as possible.

2022-11-08 Thread Alex Hall
On Sunday, October 9, 2022 at 12:09:45 PM UTC+2, Antoon Pardon wrote:
> I would like a tool that tries to find as many syntax errors as possible 
> in a python file. I know there is the risk of false positives when a 
> tool tries to recover from a syntax error and proceeds but I would 
> prefer that over the current python strategy of quiting after the first 
> syntax error. I just want a tool for syntax errors. No style 
> enforcements. Any recommandations? -- Antoon Pardon

Bit late here, coming from the Pycoder's Weekly email newsletter, but I'm 
surprised that I don't see any mentions of 
[parso](https://parso.readthedocs.io/en/latest/):

> Parso is a Python parser that supports error recovery and round-trip parsing 
> for different Python versions (in multiple Python versions). Parso is also 
> able to list multiple syntax errors in your python file.

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


Re: How to turn this Matlab code into python

2022-11-08 Thread Dioumacor FAYE
Merci beaucoup Christian pour le lien.

Le mar. 8 nov. 2022 à 17:08, Christian Gollwitzer  a
écrit :

> Am 08.11.22 um 09:01 schrieb Dioumacor FAYE:
> >>From datenum to data_mjja=precp(:,ind_mjja);
>
> I think the code filters data based on calendar dates. I'd guess that
> you can do that most easily with pandas.
>
> https://pandas.pydata.org/docs/user_guide/timeseries.html
>
> Christian
> >
> > Le lun. 7 nov. 2022 à 21:42, Christian Gollwitzer  a
> > écrit :
> >
> >> Am 07.11.22 um 18:12 schrieb Dioumacor FAYE:
> >>> hi everyone
> >>> I wanted to transform this matlab code into python. If anyone can help
> me
> >>> please let me know.
> >>> load /media/lpaosf/Dioumss/maman/data/precip_chirps_SEN_1981-2018.mat
> >>> prcp = reshape(precip,[140*100,13879]);
> >>> dates = datenum(1981,1,1):datenum(2018,12,31);
> >>> date = datevec(dates);
> >>> ind_mjja=find(date(:,2)>=5 & date(:,2)<=8);% May to Aug (May(31)+
> >> June(30)+
> >>> July(31)+ August(31)= 123 days)
> >>> data_mjja=precp(:,ind_mjja);
> >>> data_mjja_res=reshape(data_mjja,14000,123,38);
> >>
> >> which part do you have trouble with?
> >>
> >>
> >>  Christian
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
> >>
> >
> >
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 
Bien à vous,
---  -
  -
Dioumacor FAYE doctorant au  LPAOSF/ESP/UCAD/BP 5085 Dakar-Fann, Sénégal.
Tel labo: (00221) 33 825 93 64
Email: d.faye20171...@zig.univ.snTel:
+221773475098   +221783484308
Physicien en herbe
Pseudo Skype:   dioumacorfaye
-- 
https://mail.python.org/mailman/listinfo/python-list