Changeset 39cc3be in sasmodels
- Timestamp:
- Mar 21, 2016 7:05:29 AM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- a6f9577
- Parents:
- 9f51b0e
- Location:
- sasmodels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
r7ff3cf3 r39cc3be 223 223 if mono or True: 224 224 pars = np.array([values.get(p.name, p.default) 225 for p in kernel.info['parameters']]) 226 weights = np.array([1.0]) 225 for p in kernel.info['parameters']], 226 dtype=kernel.dtype) 227 weights = np.array([1.0], dtype=kernel.dtype) 227 228 details = kernel.info['mono_details'] 228 return kernel(details, pars, weights, cutoff)229 return kernel(details, weights, pars, cutoff) 229 230 else: 230 231 pairs = [get_weights(p, values) for p in kernel.info['parameters']] … … 232 233 details = generate.poly_details(kernel.info, weights, pars) 233 234 weights, pars = [np.hstack(v) for v in (weights, pars)] 234 return kernel(details, pars, weights, cutoff)235 return kernel(details, weights, pars, cutoff) 235 236 236 237 def call_ER_VR(model_info, vol_pars): -
sasmodels/kernel_iq.c
r5cf3c33 r39cc3be 60 60 if (problem->pd_length[0] == 1) { 61 61 // Shouldn't need to copy!! 62 printf("copying\n"); 62 63 63 for (int k=0; k < NPARS; k++) { 64 64 pvec[k] = pars[k+2]; // skip scale and background -
sasmodels/kerneldll.py
r7ff3cf3 r39cc3be 253 253 self.info = model_info 254 254 self.q_input = q_input 255 self.dtype = q_input.dtype 255 256 self.kernel = kernel 256 257 self.res = np.empty(q_input.nq+3, q_input.dtype) … … 261 262 self.p_res = self.res.ctypes.data 262 263 263 def __call__(self, details, values, weights, cutoff):264 def __call__(self, details, weights, values, cutoff): 264 265 real = (np.float32 if self.q_input.dtype == generate.F32 265 266 else np.float64 if self.q_input.dtype == generate.F64 266 267 else np.float128) 268 if details.dtype != np.int32 or weights.dtype != real or values.dtype != real: 269 raise TypeError("numeric type does not match the kernel type") 270 #details = np.asarray(details, dtype='int32') 271 #weights = np.asarray(weights, dtype=real) 272 #values = np.asarray(values, dtype=real) 267 273 args = [ 268 274 self.q_input.nq, # nq … … 277 283 ] 278 284 self.kernel(*args) 279 280 285 return self.res[:-3] 281 286
Note: See TracChangeset
for help on using the changeset viewer.