diff --git a/python/envi.py b/python/envi.py index cbfc82a..22c54ec 100644 --- a/python/envi.py +++ b/python/envi.py @@ -339,6 +339,8 @@ class envi: outmask[i[0][0:idx], i[1][0:idx]] = self.mask[i[0][0:idx], i[1][0:idx]] return outmask + def close(self): + self.file.close() def __del__(self): self.file.close() \ No newline at end of file diff --git a/stim/envi/bip.h b/stim/envi/bip.h index 7262b11..3af4ea9 100644 --- a/stim/envi/bip.h +++ b/stim/envi/bip.h @@ -7,6 +7,7 @@ #include #include #include +#include //CUDA //#ifdef CUDA_FOUND @@ -1863,7 +1864,7 @@ public: size_t ratio_i; T* temp_spec = (T*) malloc(Z() * sizeof(T)); //allocate space to hold a single pixel while(xy < XY){ //while there are unprocessed spectra - bs = min(XY - xy, nS); //calculate the number of spectra to include in the batch + bs = (std::min)(XY - xy, nS); //calculate the number of spectra to include in the batch for(s = 0; s < bs; s++){ //for each spectrum in the batch pixel(temp_spec, xy + s); //read a pixel from disk memcpy(&batch[s * S], temp_spec, S * sizeof(T)); -- libgit2 0.21.4