Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 38 by
Matthias...@gmail.com: power operator in array dimension
http://code.google.com/p/f2py/issues/detail?id=38
I don't know whether this is actually an f2py issue, but:
if you try to compile the following code with:
$> f2py -c -m test test.f90
subroutine array(n, A, B)
implicit none
integer n
double precision A(n,n)
double precision B(n*n) !B(n**2)
!f2py intent(in) n
!f2py intent(out) A
!f2py intent(out) B
A(:,:) = 1.0
B(:) = 2.0
print *, n
end subroutine
This code works with a multiplication in the dimension of B (i.e. B(n*n))
but it does not work with the power operator (i.e. B(n**2)). As far as I
know using the power works in common Fortran.
The error msg that I get is:
"
In function ‘f2py_rout_test_array’:
error: invalid type argument of unary ‘*’ (have ‘int’)
"
=================
What version of the product are you using? On what operating system?
I am using f2py Version: 2, numpy Version 1.6.1 Python 2.7.3 on Ubuntu 12.04
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings