Ignore:
Timestamp:
Jul 11, 2012, 3:41:33 AM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
988f580
Parents:
c71e405
Message:

aubio-types.h, aubiomodule.c: update for numpy 1.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • interfaces/python/aubioproxy.c

    rc71e405 r1458de5  
    1313
    1414    // we got an array, convert it to an fvec
    15     if (PyArray_NDIM (input) == 0) {
     15    if (PyArray_NDIM ((PyArrayObject *)input) == 0) {
    1616      PyErr_SetString (PyExc_ValueError, "input array is a scalar");
    1717      goto fail;
    18     } else if (PyArray_NDIM (input) > 1) {
     18    } else if (PyArray_NDIM ((PyArrayObject *)input) > 1) {
    1919      PyErr_SetString (PyExc_ValueError,
    2020          "input array has more than one dimensions");
     
    2222    }
    2323
    24     if (!PyArray_ISFLOAT (input)) {
     24    if (!PyArray_ISFLOAT ((PyArrayObject *)input)) {
    2525      PyErr_SetString (PyExc_ValueError, "input array should be float");
    2626      goto fail;
    27     } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
     27    } else if (PyArray_TYPE ((PyArrayObject *)input) != AUBIO_NPY_SMPL) {
    2828      PyErr_SetString (PyExc_ValueError, "input array should be float32");
    2929      goto fail;
     
    3636    // no need to really allocate fvec, just its struct member
    3737    vec = (fvec_t *)malloc(sizeof(fvec_t));
    38     vec->length = PyArray_SIZE (array);
    39     vec->data = (smpl_t *) PyArray_GETPTR1 (array, 0);
     38    vec->length = PyArray_SIZE ((PyArrayObject *)array);
     39    vec->data = (smpl_t *) PyArray_GETPTR1 ((PyArrayObject *)array, 0);
    4040
    4141  } else if (PyObject_TypeCheck (input, &PyList_Type)) {
Note: See TracChangeset for help on using the changeset viewer.