Changeset 8f5b34a in sasview for sansmodels/src/sans/models/c_models


Ignore:
Timestamp:
Dec 12, 2011 9:47:50 AM (13 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
a189869
Parents:
2371363
Message:

Re #7 Bring back deprecated numpy function (new call signature doesn't quite work)

Location:
sansmodels/src/sans/models/c_models
Files:
49 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_models/CBCCrystalModel.cpp

    rab87b61 r8f5b34a  
    172172        return NULL; 
    173173    } 
    174         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     174    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    175175        if (result == NULL) { 
    176176        const char * message= "Could not create result "; 
     
    212212             
    213213            // Make a new double matrix of same dims 
    214         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     214        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    215215        if (result == NULL){ 
    216216            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CBarBellModel.cpp

    rab87b61 r8f5b34a  
    174174        return NULL; 
    175175    } 
    176         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     176    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    177177        if (result == NULL) { 
    178178        const char * message= "Could not create result "; 
     
    214214             
    215215            // Make a new double matrix of same dims 
    216         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     216        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    217217        if (result == NULL){ 
    218218            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp

    rab87b61 r8f5b34a  
    164164        return NULL; 
    165165    } 
    166         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     166    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    167167        if (result == NULL) { 
    168168        const char * message= "Could not create result "; 
     
    204204             
    205205            // Make a new double matrix of same dims 
    206         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     206        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    207207        if (result == NULL){ 
    208208            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CCSParallelepipedModel.cpp

    rab87b61 r8f5b34a  
    184184        return NULL; 
    185185    } 
    186         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     186    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    187187        if (result == NULL) { 
    188188        const char * message= "Could not create result "; 
     
    224224             
    225225            // Make a new double matrix of same dims 
    226         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     226        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    227227        if (result == NULL){ 
    228228            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CCappedCylinderModel.cpp

    rab87b61 r8f5b34a  
    174174        return NULL; 
    175175    } 
    176         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     176    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    177177        if (result == NULL) { 
    178178        const char * message= "Could not create result "; 
     
    214214             
    215215            // Make a new double matrix of same dims 
    216         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     216        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    217217        if (result == NULL){ 
    218218            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CCoreFourShellModel.cpp

    rab87b61 r8f5b34a  
    178178        return NULL; 
    179179    } 
    180         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     180    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    181181        if (result == NULL) { 
    182182        const char * message= "Could not create result "; 
     
    218218             
    219219            // Make a new double matrix of same dims 
    220         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     220        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    221221        if (result == NULL){ 
    222222            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp

    rab87b61 r8f5b34a  
    175175        return NULL; 
    176176    } 
    177         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     177    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    178178        if (result == NULL) { 
    179179        const char * message= "Could not create result "; 
     
    215215             
    216216            // Make a new double matrix of same dims 
    217         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     217        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    218218        if (result == NULL){ 
    219219            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp

    rab87b61 r8f5b34a  
    179179        return NULL; 
    180180    } 
    181         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     181    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    182182        if (result == NULL) { 
    183183        const char * message= "Could not create result "; 
     
    219219             
    220220            // Make a new double matrix of same dims 
    221         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     221        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    222222        if (result == NULL){ 
    223223            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CCoreShellModel.cpp

    rab87b61 r8f5b34a  
    163163        return NULL; 
    164164    } 
    165         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     165    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    166166        if (result == NULL) { 
    167167        const char * message= "Could not create result "; 
     
    203203             
    204204            // Make a new double matrix of same dims 
    205         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     205        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    206206        if (result == NULL){ 
    207207            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CCylinderModel.cpp

    rab87b61 r8f5b34a  
    170170        return NULL; 
    171171    } 
    172         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     172    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    173173        if (result == NULL) { 
    174174        const char * message= "Could not create result "; 
     
    210210             
    211211            // Make a new double matrix of same dims 
    212         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     212        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    213213        if (result == NULL){ 
    214214            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp

    rab87b61 r8f5b34a  
    158158        return NULL; 
    159159    } 
    160         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     160    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    161161        if (result == NULL) { 
    162162        const char * message= "Could not create result "; 
     
    198198             
    199199            // Make a new double matrix of same dims 
    200         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     200        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    201201        if (result == NULL){ 
    202202            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp

    rab87b61 r8f5b34a  
    158158        return NULL; 
    159159    } 
    160         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     160    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    161161        if (result == NULL) { 
    162162        const char * message= "Could not create result "; 
     
    198198             
    199199            // Make a new double matrix of same dims 
    200         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     200        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    201201        if (result == NULL){ 
    202202            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp

    rab87b61 r8f5b34a  
    170170        return NULL; 
    171171    } 
    172         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     172    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    173173        if (result == NULL) { 
    174174        const char * message= "Could not create result "; 
     
    210210             
    211211            // Make a new double matrix of same dims 
    212         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     212        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    213213        if (result == NULL){ 
    214214            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp

    rab87b61 r8f5b34a  
    178178        return NULL; 
    179179    } 
    180         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     180    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    181181        if (result == NULL) { 
    182182        const char * message= "Could not create result "; 
     
    218218             
    219219            // Make a new double matrix of same dims 
    220         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     220        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    221221        if (result == NULL){ 
    222222            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CFCCrystalModel.cpp

    rab87b61 r8f5b34a  
    172172        return NULL; 
    173173    } 
    174         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     174    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    175175        if (result == NULL) { 
    176176        const char * message= "Could not create result "; 
     
    212212             
    213213            // Make a new double matrix of same dims 
    214         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     214        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    215215        if (result == NULL){ 
    216216            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CFlexCylEllipXModel.cpp

    rab87b61 r8f5b34a  
    170170        return NULL; 
    171171    } 
    172         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     172    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    173173        if (result == NULL) { 
    174174        const char * message= "Could not create result "; 
     
    210210             
    211211            // Make a new double matrix of same dims 
    212         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     212        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    213213        if (result == NULL){ 
    214214            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp

    rab87b61 r8f5b34a  
    166166        return NULL; 
    167167    } 
    168         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     168    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    169169        if (result == NULL) { 
    170170        const char * message= "Could not create result "; 
     
    206206             
    207207            // Make a new double matrix of same dims 
    208         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     208        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    209209        if (result == NULL){ 
    210210            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CFractalModel.cpp

    rab87b61 r8f5b34a  
    160160        return NULL; 
    161161    } 
    162         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     162    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    163163        if (result == NULL) { 
    164164        const char * message= "Could not create result "; 
     
    200200             
    201201            // Make a new double matrix of same dims 
    202         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     202        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    203203        if (result == NULL){ 
    204204            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CFuzzySphereModel.cpp

    rab87b61 r8f5b34a  
    162162        return NULL; 
    163163    } 
    164         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     164    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    165165        if (result == NULL) { 
    166166        const char * message= "Could not create result "; 
     
    202202             
    203203            // Make a new double matrix of same dims 
    204         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     204        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    205205        if (result == NULL){ 
    206206            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CGaussian.cpp

    rab87b61 r8f5b34a  
    153153        return NULL; 
    154154    } 
    155         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     155    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    156156        if (result == NULL) { 
    157157        const char * message= "Could not create result "; 
     
    193193             
    194194            // Make a new double matrix of same dims 
    195         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     195        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    196196        if (result == NULL){ 
    197197            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp

    rab87b61 r8f5b34a  
    155155        return NULL; 
    156156    } 
    157         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     157    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    158158        if (result == NULL) { 
    159159        const char * message= "Could not create result "; 
     
    195195             
    196196            // Make a new double matrix of same dims 
    197         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     197        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    198198        if (result == NULL){ 
    199199            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp

    rab87b61 r8f5b34a  
    159159        return NULL; 
    160160    } 
    161         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     161    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    162162        if (result == NULL) { 
    163163        const char * message= "Could not create result "; 
     
    199199             
    200200            // Make a new double matrix of same dims 
    201         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     201        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    202202        if (result == NULL){ 
    203203            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp

    rab87b61 r8f5b34a  
    174174        return NULL; 
    175175    } 
    176         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     176    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    177177        if (result == NULL) { 
    178178        const char * message= "Could not create result "; 
     
    214214             
    215215            // Make a new double matrix of same dims 
    216         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     216        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    217217        if (result == NULL){ 
    218218            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp

    rab87b61 r8f5b34a  
    163163        return NULL; 
    164164    } 
    165         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     165    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    166166        if (result == NULL) { 
    167167        const char * message= "Could not create result "; 
     
    203203             
    204204            // Make a new double matrix of same dims 
    205         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     205        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    206206        if (result == NULL){ 
    207207            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CLamellarModel.cpp

    rab87b61 r8f5b34a  
    158158        return NULL; 
    159159    } 
    160         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     160    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    161161        if (result == NULL) { 
    162162        const char * message= "Could not create result "; 
     
    198198             
    199199            // Make a new double matrix of same dims 
    200         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     200        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    201201        if (result == NULL){ 
    202202            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CLamellarPCrystalModel.cpp

    rab87b61 r8f5b34a  
    161161        return NULL; 
    162162    } 
    163         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     163    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    164164        if (result == NULL) { 
    165165        const char * message= "Could not create result "; 
     
    201201             
    202202            // Make a new double matrix of same dims 
    203         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     203        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    204204        if (result == NULL){ 
    205205            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp

    rab87b61 r8f5b34a  
    169169        return NULL; 
    170170    } 
    171         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     171    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    172172        if (result == NULL) { 
    173173        const char * message= "Could not create result "; 
     
    209209             
    210210            // Make a new double matrix of same dims 
    211         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     211        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    212212        if (result == NULL){ 
    213213            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp

    rab87b61 r8f5b34a  
    164164        return NULL; 
    165165    } 
    166         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     166    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    167167        if (result == NULL) { 
    168168        const char * message= "Could not create result "; 
     
    204204             
    205205            // Make a new double matrix of same dims 
    206         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     206        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    207207        if (result == NULL){ 
    208208            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CLogNormal.cpp

    rab87b61 r8f5b34a  
    153153        return NULL; 
    154154    } 
    155         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     155    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    156156        if (result == NULL) { 
    157157        const char * message= "Could not create result "; 
     
    193193             
    194194            // Make a new double matrix of same dims 
    195         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     195        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    196196        if (result == NULL){ 
    197197            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CLorentzian.cpp

    rab87b61 r8f5b34a  
    153153        return NULL; 
    154154    } 
    155         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     155    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    156156        if (result == NULL) { 
    157157        const char * message= "Could not create result "; 
     
    193193             
    194194            // Make a new double matrix of same dims 
    195         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     195        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    196196        if (result == NULL){ 
    197197            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CMultiShellModel.cpp

    rab87b61 r8f5b34a  
    167167        return NULL; 
    168168    } 
    169         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     169    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    170170        if (result == NULL) { 
    171171        const char * message= "Could not create result "; 
     
    207207             
    208208            // Make a new double matrix of same dims 
    209         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     209        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    210210        if (result == NULL){ 
    211211            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/COnionModel.cpp

    rab87b61 r8f5b34a  
    239239        return NULL; 
    240240    } 
    241         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     241    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    242242        if (result == NULL) { 
    243243        const char * message= "Could not create result "; 
     
    279279             
    280280            // Make a new double matrix of same dims 
    281         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     281        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    282282        if (result == NULL){ 
    283283            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp

    rab87b61 r8f5b34a  
    178178        return NULL; 
    179179    } 
    180         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     180    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    181181        if (result == NULL) { 
    182182        const char * message= "Could not create result "; 
     
    218218             
    219219            // Make a new double matrix of same dims 
    220         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     220        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    221221        if (result == NULL){ 
    222222            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CPearlNecklaceModel.cpp

    rab87b61 r8f5b34a  
    165165        return NULL; 
    166166    } 
    167         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     167    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    168168        if (result == NULL) { 
    169169        const char * message= "Could not create result "; 
     
    205205             
    206206            // Make a new double matrix of same dims 
    207         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     207        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    208208        if (result == NULL){ 
    209209            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CPoly_GaussCoil.cpp

    rab87b61 r8f5b34a  
    157157        return NULL; 
    158158    } 
    159         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     159    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    160160        if (result == NULL) { 
    161161        const char * message= "Could not create result "; 
     
    197197             
    198198            // Make a new double matrix of same dims 
    199         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     199        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    200200        if (result == NULL){ 
    201201            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CRPAModel.cpp

    rab87b61 r8f5b34a  
    182182        return NULL; 
    183183    } 
    184         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     184    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    185185        if (result == NULL) { 
    186186        const char * message= "Could not create result "; 
     
    222222             
    223223            // Make a new double matrix of same dims 
    224         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     224        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    225225        if (result == NULL){ 
    226226            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CReflAdvModel.cpp

    rab87b61 r8f5b34a  
    224224        return NULL; 
    225225    } 
    226         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     226    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    227227        if (result == NULL) { 
    228228        const char * message= "Could not create result "; 
     
    264264             
    265265            // Make a new double matrix of same dims 
    266         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     266        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    267267        if (result == NULL){ 
    268268            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CReflModel.cpp

    rab87b61 r8f5b34a  
    200200        return NULL; 
    201201    } 
    202         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     202    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    203203        if (result == NULL) { 
    204204        const char * message= "Could not create result "; 
     
    240240             
    241241            // Make a new double matrix of same dims 
    242         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     242        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    243243        if (result == NULL){ 
    244244            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CSCCrystalModel.cpp

    rab87b61 r8f5b34a  
    172172        return NULL; 
    173173    } 
    174         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     174    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    175175        if (result == NULL) { 
    176176        const char * message= "Could not create result "; 
     
    212212             
    213213            // Make a new double matrix of same dims 
    214         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     214        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    215215        if (result == NULL){ 
    216216            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CSLDCalFunc.cpp

    rab87b61 r8f5b34a  
    159159        return NULL; 
    160160    } 
    161         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     161    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    162162        if (result == NULL) { 
    163163        const char * message= "Could not create result "; 
     
    199199             
    200200            // Make a new double matrix of same dims 
    201         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     201        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    202202        if (result == NULL){ 
    203203            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CSchulz.cpp

    rab87b61 r8f5b34a  
    153153        return NULL; 
    154154    } 
    155         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     155    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    156156        if (result == NULL) { 
    157157        const char * message= "Could not create result "; 
     
    193193             
    194194            // Make a new double matrix of same dims 
    195         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     195        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    196196        if (result == NULL){ 
    197197            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CSphereModel.cpp

    rab87b61 r8f5b34a  
    158158        return NULL; 
    159159    } 
    160         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     160    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    161161        if (result == NULL) { 
    162162        const char * message= "Could not create result "; 
     
    198198             
    199199            // Make a new double matrix of same dims 
    200         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     200        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    201201        if (result == NULL){ 
    202202            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CSphereSLDModel.cpp

    rab87b61 r8f5b34a  
    216216        return NULL; 
    217217    } 
    218         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     218    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    219219        if (result == NULL) { 
    220220        const char * message= "Could not create result "; 
     
    256256             
    257257            // Make a new double matrix of same dims 
    258         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     258        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    259259        if (result == NULL){ 
    260260            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp

    rab87b61 r8f5b34a  
    157157        return NULL; 
    158158    } 
    159         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     159    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    160160        if (result == NULL) { 
    161161        const char * message= "Could not create result "; 
     
    197197             
    198198            // Make a new double matrix of same dims 
    199         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     199        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    200200        if (result == NULL){ 
    201201            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp

    rab87b61 r8f5b34a  
    177177        return NULL; 
    178178    } 
    179         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     179    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    180180        if (result == NULL) { 
    181181        const char * message= "Could not create result "; 
     
    217217             
    218218            // Make a new double matrix of same dims 
    219         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     219        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    220220        if (result == NULL){ 
    221221            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp

    rab87b61 r8f5b34a  
    157157        return NULL; 
    158158    } 
    159         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     159    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    160160        if (result == NULL) { 
    161161        const char * message= "Could not create result "; 
     
    197197             
    198198            // Make a new double matrix of same dims 
    199         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     199        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    200200        if (result == NULL){ 
    201201            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp

    rab87b61 r8f5b34a  
    178178        return NULL; 
    179179    } 
    180         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     180    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    181181        if (result == NULL) { 
    182182        const char * message= "Could not create result "; 
     
    218218             
    219219            // Make a new double matrix of same dims 
    220         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     220        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    221221        if (result == NULL){ 
    222222            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/CVesicleModel.cpp

    rab87b61 r8f5b34a  
    162162        return NULL; 
    163163    } 
    164         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     164    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    165165        if (result == NULL) { 
    166166        const char * message= "Could not create result "; 
     
    202202             
    203203            // Make a new double matrix of same dims 
    204         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     204        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    205205        if (result == NULL){ 
    206206            const char * message= "Could not create result "; 
  • sansmodels/src/sans/models/c_models/classTemplate.txt

    rab87b61 r8f5b34a  
    143143        return NULL; 
    144144    } 
    145         result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);                                                                                   
     145    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), PyArray_DOUBLE); 
    146146        if (result == NULL) { 
    147147        const char * message= "Could not create result "; 
     
    183183             
    184184            // Make a new double matrix of same dims 
    185         result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE); 
     185        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE); 
    186186        if (result == NULL){ 
    187187            const char * message= "Could not create result "; 
Note: See TracChangeset for help on using the changeset viewer.