Skip to content

Commit 3b2fdff

Browse files
committed
Added explicit conversion to built-in 'float' for calculations performed using NumPy
1 parent 9856ceb commit 3b2fdff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/murfey/workflows/spa/picking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def _register_picked_particles_use_diameter(message: dict, _db: Session):
113113
picking_db = _db.exec(
114114
select(ParticleSizes.particle_size).where(ParticleSizes.pj_id == pj_id)
115115
).all()
116-
particle_diameter = np.quantile(list(picking_db), 0.75)
116+
particle_diameter = float(np.quantile(list(picking_db), 0.75))
117117
relion_params.particle_diameter = particle_diameter
118118
_db.add(relion_params)
119119
_db.commit()

src/murfey/workflows/tomo/tomo_metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,15 @@ def register_batch_position_in_database(
351351
search_map.width / 2,
352352
search_map.height / 2,
353353
]
354-
tilt_series.x_location = (
354+
tilt_series.x_location = float(
355355
(
356356
centre_batch_pixel[0]
357357
- batch_parameters.x_beamshift / search_map.pixel_size
358358
)
359359
* 512
360360
/ search_map.width
361361
)
362-
tilt_series.y_location = (
362+
tilt_series.y_location = float(
363363
(
364364
centre_batch_pixel[1]
365365
+ batch_parameters.y_beamshift / search_map.pixel_size

0 commit comments

Comments
 (0)