Re: [Numpy-discussion] Attempting to wrap a Fortran-77 subroutine using f2py but I haven't been able to understand what is causing the error

2020-10-19 Thread Melissa Mendonça
Hello, Sam, sorry for taking so long to answer!

The problem seems to be that you are using

cf2py depend(in) Y, YP

instead of

cf2py depend(n) Y, YP <- (note that there was a spurious i in that depend
expression)

and that the callback FCN needs the dimension n as an argument. I was able
to compile your code correctly after making these changes.

If you have any further questions let me know, I hope this helps.

Cheers,

Melissa


On Wed, Oct 14, 2020 at 4:03 AM Samuel Dupree  wrote:

> I'm attempting to wrap a Fortran-77 source member using f2py. I'm
> running he Anaconda distribution for Python 3.7.6 on a Mac Pro (2019)
> under Mac OS X Catalina (ver. 10.15.6). The version of NumPy I'm running
> is 1.18.3.
>
> I've attached a copy of the Fortran source code to this note (see
> rkfn78.for). The command I'm using to wrap this code is
>
> f2py3 -c rkfn78.for --fcompiler=gfortran --f77flags="-c -O -Wall" -m rkfn78
>
> The output I get is captured in the file rkfn78_build_output.txt.
>
> I don't understand the cause behind the error message I get, so any
> advice would be welcomed.
>
> Sam Dupree.
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Attempting to wrap a Fortran-77 subroutine using f2py but I haven't been able to understand what is causing the error

2020-10-19 Thread Samuel Dupree

Melissa,

Thank you for answering my post. I made the changes you recommended and 
the code compiles successfully. But I do have one question. The arrays 
being passed in the CALL to FCN were treated as assumed shaped arrays in 
the called subroutine. Are assumed shaped arrays a problem for f2py?


Sam Dupree.


On October/19/2020 09:16:02, Melissa Mendonça wrote:

Hello, Sam, sorry for taking so long to answer!

The problem seems to be that you are using

cf2py depend(in) Y, YP

instead of

cf2py depend(n) Y, YP <- (note that there was a spurious i in that 
depend expression)


and that the callback FCN needs the dimension n as an argument. I was 
able to compile your code correctly after making these changes.


If you have any further questions let me know, I hope this helps.

Cheers,

Melissa


On Wed, Oct 14, 2020 at 4:03 AM Samuel Dupree > wrote:


I'm attempting to wrap a Fortran-77 source member using f2py. I'm
running he Anaconda distribution for Python 3.7.6 on a Mac Pro (2019)
under Mac OS X Catalina (ver. 10.15.6). The version of NumPy I'm
running
is 1.18.3.

I've attached a copy of the Fortran source code to this note (see
rkfn78.for). The command I'm using to wrap this code is

f2py3 -c rkfn78.for --fcompiler=gfortran --f77flags="-c -O -Wall"
-m rkfn78

The output I get is captured in the file rkfn78_build_output.txt.

I don't understand the cause behind the error message I get, so any
advice would be welcomed.

Sam Dupree.
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org 
https://mail.python.org/mailman/listinfo/numpy-discussion



___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

--
mail-signature



   Samuel H. Dupree, jr.sdup...@speakeasy.net
   10501 Rising Ridge Road
   Apartment 201 http://users.speakeasy.net/~sdupree/
   Fredericksburg, VA 22407, USA

    HOME: 540-693-1240            iPhone: 215-530-8753         FAX: 
866-514-9629


/  "The Greatest Show on Earth" is not on Earth. It's in Space!/


___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Attempting to wrap a Fortran-77 subroutine using f2py but I haven't been able to understand what is causing the error

2020-10-19 Thread Melissa Mendonça
Sure, you can use assume-shape arrays, but if you generate a signature file
using

$ f2py rkfn78.for -m rkfn78 -h rkfn78.pyf

you can see that f2py correctly determines n to be the length of the array
Y, but since YP also depends on n, that's what generated the error you saw
the first time.

If you change the .pyf signature file to the one attached to this message,
delete your original cf2py lines in the .for file and compile it all using

$ f2py -c rkfn78.pyf rkfn78.for --fcompiler=gfortran --f77flags="-c -O
-Wall" -m rkfn78

then you'll have no trouble with assumed-shape arrays.

Cheers,

Melissa

On Mon, Oct 19, 2020 at 1:03 PM Samuel Dupree  wrote:
>
> Melissa,
>
> Thank you for answering my post. I made the changes you recommended and
the code compiles successfully. But I do have one question. The arrays
being passed in the CALL to FCN were treated as assumed shaped arrays in
the called subroutine. Are assumed shaped arrays a problem for f2py?
>
> Sam Dupree.
>
>
> On October/19/2020 09:16:02, Melissa Mendonça wrote:
>
> Hello, Sam, sorry for taking so long to answer!
>
> The problem seems to be that you are using
>
> cf2py depend(in) Y, YP
>
> instead of
>
> cf2py depend(n) Y, YP <- (note that there was a spurious i in that depend
expression)
>
> and that the callback FCN needs the dimension n as an argument. I was
able to compile your code correctly after making these changes.
>
> If you have any further questions let me know, I hope this helps.
>
> Cheers,
>
> Melissa
>
>
> On Wed, Oct 14, 2020 at 4:03 AM Samuel Dupree 
wrote:
>>
>> I'm attempting to wrap a Fortran-77 source member using f2py. I'm
>> running he Anaconda distribution for Python 3.7.6 on a Mac Pro (2019)
>> under Mac OS X Catalina (ver. 10.15.6). The version of NumPy I'm running
>> is 1.18.3.
>>
>> I've attached a copy of the Fortran source code to this note (see
>> rkfn78.for). The command I'm using to wrap this code is
>>
>> f2py3 -c rkfn78.for --fcompiler=gfortran --f77flags="-c -O -Wall" -m
rkfn78
>>
>> The output I get is captured in the file rkfn78_build_output.txt.
>>
>> I don't understand the cause behind the error message I get, so any
>> advice would be welcomed.
>>
>> Sam Dupree.
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
> --
> 
>
>
>Samuel H. Dupree, Jr.   sdup...@speakeasy.net
>10501 Rising Ridge Road
>Apartment 201
http://users.speakeasy.net/~sdupree/
>Fredericksburg, VA 22407, USA
>
> HOME: 540-693-1240iPhone: 215-530-8753
 FAX: 866-514-9629
>
>   "The Greatest Show on Earth" is not on Earth. It's in Space!
>
> 


rkfn78.pyf
Description: Binary data
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Attempting to wrap a Fortran-77 subroutine using f2py but I haven't been able to understand what is causing the error

2020-10-19 Thread Samuel Dupree
One more question. Where can I find a documentation on f2py that covers 
issues like assumed shaped arrays, and issues such as the one discussed 
in this post?


Sam Dupree.


On October/19/2020 13:01:13, Melissa Mendonça wrote:
Sure, you can use assume-shape arrays, but if you generate a signature 
file using


$ f2py rkfn78.for -m rkfn78 -h rkfn78.pyf

you can see that f2py correctly determines n to be the length of the 
array Y, but since YP also depends on n, that's what generated the 
error you saw the first time.


If you change the .pyf signature file to the one attached to this 
message, delete your original cf2py lines in the .for file and compile 
it all using


$ f2py -c rkfn78.pyf rkfn78.for --fcompiler=gfortran --f77flags="-c -O 
-Wall" -m rkfn78


then you'll have no trouble with assumed-shape arrays.

Cheers,

Melissa

On Mon, Oct 19, 2020 at 1:03 PM Samuel Dupree > wrote:

>
> Melissa,
>
> Thank you for answering my post. I made the changes you recommended 
and the code compiles successfully. But I do have one question. The 
arrays being passed in the CALL to FCN were treated as assumed shaped 
arrays in the called subroutine. Are assumed shaped arrays a problem 
for f2py?

>
> Sam Dupree.
>
>
> On October/19/2020 09:16:02, Melissa Mendonça wrote:
>
> Hello, Sam, sorry for taking so long to answer!
>
> The problem seems to be that you are using
>
> cf2py depend(in) Y, YP
>
> instead of
>
> cf2py depend(n) Y, YP <- (note that there was a spurious i in that 
depend expression)

>
> and that the callback FCN needs the dimension n as an argument. I 
was able to compile your code correctly after making these changes.

>
> If you have any further questions let me know, I hope this helps.
>
> Cheers,
>
> Melissa
>
>
> On Wed, Oct 14, 2020 at 4:03 AM Samuel Dupree > wrote:

>>
>> I'm attempting to wrap a Fortran-77 source member using f2py. I'm
>> running he Anaconda distribution for Python 3.7.6 on a Mac Pro (2019)
>> under Mac OS X Catalina (ver. 10.15.6). The version of NumPy I'm 
running

>> is 1.18.3.
>>
>> I've attached a copy of the Fortran source code to this note (see
>> rkfn78.for). The command I'm using to wrap this code is
>>
>> f2py3 -c rkfn78.for --fcompiler=gfortran --f77flags="-c -O -Wall" 
-m rkfn78

>>
>> The output I get is captured in the file rkfn78_build_output.txt.
>>
>> I don't understand the cause behind the error message I get, so any
>> advice would be welcomed.
>>
>> Sam Dupree.
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org 
>> https://mail.python.org/mailman/listinfo/numpy-discussion 


>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org 
> https://mail.python.org/mailman/listinfo/numpy-discussion 


>


___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Attempting to wrap a Fortran-77 subroutine using f2py but I haven't been able to understand what is causing the error

2020-10-19 Thread Melissa Mendonça
The documentation for f2py is not very complete, I'm afraid. I'll try to
work on that front in the next few months. For now, you can find it here:
https://numpy.org/doc/stable/f2py

Cheers,

Melissa

On Mon, Oct 19, 2020 at 2:35 PM Samuel Dupree  wrote:

> One more question. Where can I find a documentation on f2py that covers
> issues like assumed shaped arrays, and issues such as the one discussed in
> this post?
>
> Sam Dupree.
>
>
> On October/19/2020 13:01:13, Melissa Mendonça wrote:
>
> Sure, you can use assume-shape arrays, but if you generate a signature
> file using
>
> $ f2py rkfn78.for -m rkfn78 -h rkfn78.pyf
>
> you can see that f2py correctly determines n to be the length of the array
> Y, but since YP also depends on n, that's what generated the error you saw
> the first time.
>
> If you change the .pyf signature file to the one attached to this message,
> delete your original cf2py lines in the .for file and compile it all using
>
> $ f2py -c rkfn78.pyf rkfn78.for --fcompiler=gfortran --f77flags="-c -O
> -Wall" -m rkfn78
>
> then you'll have no trouble with assumed-shape arrays.
>
> Cheers,
>
> Melissa
>
> On Mon, Oct 19, 2020 at 1:03 PM Samuel Dupree 
> wrote:
> >
> > Melissa,
> >
> > Thank you for answering my post. I made the changes you recommended and
> the code compiles successfully. But I do have one question. The arrays
> being passed in the CALL to FCN were treated as assumed shaped arrays in
> the called subroutine. Are assumed shaped arrays a problem for f2py?
> >
> > Sam Dupree.
> >
> >
> > On October/19/2020 09:16:02, Melissa Mendonça wrote:
> >
> > Hello, Sam, sorry for taking so long to answer!
> >
> > The problem seems to be that you are using
> >
> > cf2py depend(in) Y, YP
> >
> > instead of
> >
> > cf2py depend(n) Y, YP <- (note that there was a spurious i in that
> depend expression)
> >
> > and that the callback FCN needs the dimension n as an argument. I was
> able to compile your code correctly after making these changes.
> >
> > If you have any further questions let me know, I hope this helps.
> >
> > Cheers,
> >
> > Melissa
> >
> >
> > On Wed, Oct 14, 2020 at 4:03 AM Samuel Dupree 
> wrote:
> >>
> >> I'm attempting to wrap a Fortran-77 source member using f2py. I'm
> >> running he Anaconda distribution for Python 3.7.6 on a Mac Pro (2019)
> >> under Mac OS X Catalina (ver. 10.15.6). The version of NumPy I'm running
> >> is 1.18.3.
> >>
> >> I've attached a copy of the Fortran source code to this note (see
> >> rkfn78.for). The command I'm using to wrap this code is
> >>
> >> f2py3 -c rkfn78.for --fcompiler=gfortran --f77flags="-c -O -Wall" -m
> rkfn78
> >>
> >> The output I get is captured in the file rkfn78_build_output.txt.
> >>
> >> I don't understand the cause behind the error message I get, so any
> >> advice would be welcomed.
> >>
> >> Sam Dupree.
> >> ___
> >> NumPy-Discussion mailing list
> >> NumPy-Discussion@python.org
> >> https://mail.python.org/mailman/listinfo/numpy-discussion
> >
> >
> > ___
> > NumPy-Discussion mailing list
> > NumPy-Discussion@python.org
> > https://mail.python.org/mailman/listinfo/numpy-discussion
> >
>
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Attempting to wrap a Fortran-77 subroutine using f2py but I haven't been able to understand what is causing the error

2020-10-19 Thread Samuel Dupree

Melissa,

I've tried working with the documentation hosted at 
https://numpy.org/doc/stable/f2py/  
and you're right, it is not very complete ;-). So on that front I wish 
you the best. Once again, thank you very much for answering my post.


All the best.

Sam Dupree.


On October/19/2020 13:53:03, Melissa Mendonça wrote:
The documentation for f2py is not very complete, I'm afraid. I'll try 
to work on that front in the next few months. For now, you can find it 
here: https://numpy.org/doc/stable/f2py 



Cheers,

Melissa

On Mon, Oct 19, 2020 at 2:35 PM Samuel Dupree > wrote:


One more question. Where can I find a documentation on f2py that
covers issues like assumed shaped arrays, and issues such as the
one discussed in this post?

Sam Dupree.


On October/19/2020 13:01:13, Melissa Mendonça wrote:

Sure, you can use assume-shape arrays, but if you generate a
signature file using

$ f2py rkfn78.for -m rkfn78 -h rkfn78.pyf

you can see that f2py correctly determines n to be the length of
the array Y, but since YP also depends on n, that's what
generated the error you saw the first time.

If you change the .pyf signature file to the one attached to this
message, delete your original cf2py lines in the .for file and
compile it all using

$ f2py -c rkfn78.pyf rkfn78.for --fcompiler=gfortran
--f77flags="-c -O -Wall" -m rkfn78

then you'll have no trouble with assumed-shape arrays.

Cheers,

Melissa

On Mon, Oct 19, 2020 at 1:03 PM Samuel Dupree
mailto:sdup...@speakeasy.net>> wrote:
>
> Melissa,
>
> Thank you for answering my post. I made the changes you
recommended and the code compiles successfully. But I do have one
question. The arrays being passed in the CALL to FCN were treated
as assumed shaped arrays in the called subroutine. Are assumed
shaped arrays a problem for f2py?
>
> Sam Dupree.
>
>
> On October/19/2020 09:16:02, Melissa Mendonça wrote:
>
> Hello, Sam, sorry for taking so long to answer!
>
> The problem seems to be that you are using
>
> cf2py depend(in) Y, YP
>
> instead of
>
> cf2py depend(n) Y, YP <- (note that there was a spurious i in
that depend expression)
>
> and that the callback FCN needs the dimension n as an argument.
I was able to compile your code correctly after making these changes.
>
> If you have any further questions let me know, I hope this helps.
>
> Cheers,
>
> Melissa
>
>
> On Wed, Oct 14, 2020 at 4:03 AM Samuel Dupree
mailto:sdup...@speakeasy.net>> wrote:
>>
>> I'm attempting to wrap a Fortran-77 source member using f2py. I'm
>> running he Anaconda distribution for Python 3.7.6 on a Mac Pro
(2019)
>> under Mac OS X Catalina (ver. 10.15.6). The version of NumPy
I'm running
>> is 1.18.3.
>>
>> I've attached a copy of the Fortran source code to this note (see
>> rkfn78.for). The command I'm using to wrap this code is
>>
>> f2py3 -c rkfn78.for --fcompiler=gfortran --f77flags="-c -O
-Wall" -m rkfn78
>>
>> The output I get is captured in the file rkfn78_build_output.txt.
>>
>> I don't understand the cause behind the error message I get,
so any
>> advice would be welcomed.
>>
>> Sam Dupree.
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org 
>> https://mail.python.org/mailman/listinfo/numpy-discussion

>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org 
> https://mail.python.org/mailman/listinfo/numpy-discussion

>



___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-Dev] ANN: SciPy 1.5.3

2020-10-19 Thread Warren Weckesser
On 10/17/20, Tyler Reddy  wrote:
> Hi all,
>
> On behalf of the SciPy development team I'm pleased to announce
> the release of SciPy 1.5.3, which is a bug fix release that includes
> Linux ARM64 wheels for the first time.


Thanks Tyler!  A lot of work goes into a SciPy release, so I'm
grateful you continue to manage the releases so well.

Warren


>
> Sources and binary wheels can be found at:
> https://pypi.org/project/scipy/
> and at: https://github.com/scipy/scipy/releases/tag/v1.5.3
>
> One of a few ways to install this release with pip:
>
> pip install scipy==1.5.3
>
> ==
> SciPy 1.5.3 Release Notes
> ==
>
> SciPy 1.5.3 is a bug-fix release with no new features
> compared to 1.5.2. In particular, Linux ARM64 wheels are now
> available and a compatibility issue with XCode 12 has
> been fixed.
>
> Authors
> ==
>
> * Peter Bell
> * CJ Carey
> * Thomas Duvernay +
> * Gregory Lee
> * Eric Moore
> * odidev
> * Dima Pasechnik
> * Tyler Reddy
> * Simon Segerblom Rex +
> * Daniel B. Smith
> * Will Tirone +
> * Warren Weckesser
>
> A total of 12 people contributed to this release.
> People with a "+" by their names contributed a patch for the first time.
> This list of names is automatically generated, and may not be fully
> complete.
>
> Issues closed for 1.5.3
> --
>
> * `#9611 `__: Overflow error
> with new way of p-value calculation in kendall...
> * `#10069 `__:
> scipy.ndimage.watershed_ift regression in 1.0.0
> * `#11260 `__: BUG: DOP853
> with complex data computes complex error norm, causing...
> * `#11479 `__: RuntimeError:
> dictionary changed size during iteration on loading...
> * `#11972 `__: BUG (solved):
> Error estimation in DOP853 ODE solver fails for...
> * `#12543 `__: BUG: Picture
> rotated 180 degrees and rotated -180 degrees should...
> * `#12613 `__: Travis X.4 and
> X.7 failures in master
> * `#12654 `__:
> scipy.stats.combine_pvalues produces wrong results with
> method='mudholkar_george'
> * `#12819 `__: BUG: Scipy
> Sparse slice indexing assignment Bug with zeros
> * `#12834 `__: BUG: ValueError
> upon calling Scipy Interpolator objects
> * `#12836 `__: ndimage.median
> can return incorrect values for integer inputs
> * `#12860 `__: Build failure
> with Xcode 12
>
> Pull requests for 1.5.3
> -
>
> * `#12611 `__: MAINT: prepare
> for SciPy 1.5.3
> * `#12614 `__: MAINT: prevent
> reverse broadcasting
> * `#12617 `__: MAINT: optimize:
> Handle nonscalar size 1 arrays in fmin_slsqp...
> * `#12623 `__: MAINT: stats:
> Loosen some test tolerances.
> * `#12638 `__: CI, MAINT: pin
> pytest for Azure win
> * `#12668 `__: BUG: Ensure
> factorial is not too large in mstats.kendalltau
> * `#12705 `__: MAINT:
> \`openblas_support\` added sha256 hash
> * `#12706 `__: BUG: fix
> incorrect 1d case of the fourier_ellipsoid filter
> * `#12721 `__: BUG: use
> special.sindg in ndimage.rotate
> * `#12724 `__: BUG: per #12654
> adjusted mudholkar_george method to combine p...
> * `#12726 `__: BUG: Fix DOP853
> error norm for complex problems
> * `#12730 `__: CI: pin xdist for
> Azure windows
> * `#12786 `__: BUG: stats: Fix
> formula in the \`stats\` method of the ARGUS...
> * `#12795 `__: CI: Pin
> setuptools on windows CI
> * `#12830 `__: [BUG] sparse:
> Avoid using size attribute in LIL __setitem__
> * `#12833 `__: BUG: change list
> of globals items to list of a copy
> * `#12842 `__: BUG: Use uint16
> for cost in NI_WatershedElement
> * `#12845 `__: BUG: avoid
> boolean or integer addition error in ndimage.measurements.median
> * `#12864 `__: BLD: replace the
> #i