Changeset fc049b7 in sasview


Ignore:
Timestamp:
Apr 4, 2014 9:30:16 AM (10 years ago)
Author:
pkienzle
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:
767514a
Parents:
f309303
Message:

fix park bounds checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • park-1.2.1/park/simplex.py

    r3570545 rfc049b7  
    157157 
    158158        # Keep the initial simplex inside the bounds 
    159         x0[x0<lo] = lo 
    160         x0[x0>hi] = hi 
     159        x0[x0<lo] = lo[x0<lo] 
     160        x0[x0>hi] = hi[x0>hi] 
    161161        bounded = ~numpy.isinf(lo) & ~numpy.isinf(hi) 
    162162        val[bounded] = x0[bounded] + (hi[bounded]-lo[bounded])*radius 
    163         val[val<lo] = lo 
    164         val[val>hi] = hi 
     163        val[val<lo] = lo[val<lo] 
     164        val[val>hi] = hi[val>hi] 
    165165         
    166166        # If the initial point was at or beyond an upper bound, then bounds 
Note: See TracChangeset for help on using the changeset viewer.