Skip to main content

Home/ Python Programming/ Group items tagged numpy

Rss Feed Group items tagged

jamessidis

Best Way to Learn Numpy - 0 views

  •  
    NumPy is the fundamental package for scientific computing in Python. Numpy stands for Numerical Python. If you want to work with machine learning or data science, Numpy is a Python library you will mostly use. It is a Python library that provides a multidimensional array object for fast operations on arrays, including mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete Fourier transforms, basic linear algebra, basic statistical operations, and much more.
reckoner reckoner

12. Writing a C extension to NumPy - 0 views

  • There are two applications that require using the NumPy array type in C extension modules: Access to numerical libraries: Extension modules can be used to make numerical libraries written in C (or languages linkable to C, such as Fortran) accessible to Python programs. The NumPy array type has the advantage of using the same data layout as arrays in C and Fortran. Mixed-language numerical code: In most numerical applications, only a small part of the total code is CPU time intensive. Only this part should thus be written in C, the rest can be written in Python. NumPy arrays are important for the interface between these two parts, because they provide equally simple access to their contents from Python and from C. This document is a tutorial for using NumPy arrays in C extensions.
reckoner reckoner

Applying sympy expressions on numpy arrays - sympy | Google Groups - 0 views

  • If I have:     from sympy import Symbol, Integrate     x = Symbol('x')     f = x**2 + x     g = Integrate(f, x) how can I apply g to a numpy array? In other words, how can I "numpify" the g expression, injecting in it x = numpy.linspace(1, 9, 9)? What would be even nicer would be to be able to retrieve a lambda using numpy functions for g as a function of x (that way I don't have the overhead of numpifying it each time I want to apply it to an array).
Mario Antonio Herrero Machado

Acerca de Pybonacci « Pybonacci - 0 views

  •  
    Somos unos apasionados de Python que nos hemos decidido a rellenar el que pensamos que es un hueco importante en la blogosfera hispana: el uso de Python para aplicaciones científicas. Nuestra intención es escribir con regularidad sobre cómo podemos utilizar este lenguaje de programación fantástico que es Python para resolver problemas en ciencia e ingeniería, utilizando librerías como NumPy, SciPy, matplotlib, SymPy y muchas más. También traduciremos artículos escritos en otros idiomas que nos resulten interesantes, mostraremos pequeñas recetas y escribiremos reseñas sobre programas o bibliotecas que nos resulten interesantes.
reckoner reckoner

Plotting NaNs in Matplotlib (matplotlib-users) - 0 views

  • Your example works as you describe on recent matplotlib versions. I suspect you are using an old one. The preferred way of handling missing points in numpy, and therefore in matplotlib and pylab, however, is via masked arrays.import pylabimport numpy as npfrom numpy import maa = [1,2,3,4,5]b = np.array([6,2,np.nan,1,9])bm = ma.masked_where(np.isnan(b), b)pylab.plot(a,bm)pylab.show()There are many other examples of masked array use in the examples directory of the matplotlib distribution.EricFernando Abilleira wrote:> Dear sourceforge community,> > I come from a Matlab environment so I am used to plotting matrices that > contain NaN elements. This is very useful because in some cases one > doesn't have data for the entire matrix. If one tries plotting the data, > the NaN elements won't be plotted.
reckoner reckoner

spreadsheet in python: pyspread - 0 views

  • Pyspread is a spreadsheet that accepts a pure python expression in each cell. Requires Python 2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
    • reckoner reckoner
       
      not ready for prime time yet. Worth watching, however
reckoner reckoner

TANGO Project - 0 views

  •  
    This is the Python wrapper for the solver. It calls the optimization solver (GENCAN for bound-constrainted problems and ALGENCAN for general nonlinear programming problems).
reckoner reckoner

Place n indistinguishable items into k distinguishable boxes - comp.lang.python | Googl... - 0 views

  • >     Generate all ways to place n indistiguishable items into k >     distinguishable boxes
1 - 9 of 9
Showing 20 items per page