# [SciPy-user] I'm a newbie in Python ans SciPy... so i've a little question

lorenzo bolla lbolla@gmail....
Thu Jan 10 08:53:59 CST 2008

```no idea...
but if you use numpy, no problem!

#import numarray as N
import numpy as N
import scipy.linalg as S

ar = N.array([[4.0, -2.0, 1.0], \
[-2.0, 4.0, -2.0], \
[1.0, -2.0, 3.0]])
print 'Before det() ar = \n', ar

print N.det(ar)                                                     # Get
determinant of ar
print 'After det() ar = \n', ar

hth,
L.

On 1/10/08, Juan Martinez <jmartinezs@sii.cl> wrote:
>
>  Hello Everybody:
>
> I'm a newbie user of Scipy, and i try to get a determinant of a matrix,
> but the matrix object is modified for the method det() of linalg
>
> A little piece of with example..
>
> CODE
>
> #!/usr/bin/env python
> # coding: latin-1
>
> # Modules import
> from numarray import *
> from scipy.linalg import *
>
> ar = array([[4.0, -2.0, 1.0], \
>             [-2.0, 4.0, -2.0], \
>             [1.0, -2.0, 3.0]])
> print 'Before det() ar = \n', ar
>
> print det(ar)                                                     # Get
> determinant of ar
> print 'After det() ar = \n', ar
>
> END CODE
>
>
> ON SCREEN
>
> Before det() ar =
> [[ 4. -2.  1.]
>  [-2.  4. -2.]
>  [ 1. -2.  3.]]
> After det() ar =
> [[ 4.   -0.5   0.25]
>  [-2.    3.   -0.5 ]
>  [ 1.   -1.5   2.  ]]
>
> END OUTPUT
>
> Please, help me to know what i'm doing wrong.
>
>
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>

--
Lorenzo Bolla
lbolla@gmail.com
http://lorenzobolla.emurse.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20080110/9a8ea20c/attachment.html
```