Remove unreached error
@@ -64,17 +64,13 @@ def cholesky(a):
cusolver.cpotrf(
handle, cublas.CUBLAS_FILL_MODE_UPPER, n, x.data.ptr, n,
workspace.data.ptr, buffersize, dev_info.data.ptr)
- elif dtype == 'D':
+ else: # dtype == 'D':
buffersize = cusolver.zpotrf_bufferSize(
handle, cublas.CUBLAS_FILL_MODE_UPPER, n, x.data.ptr, n)
workspace = cupy.empty(buffersize, dtype=numpy.complex128)
cusolver.zpotrf(
handle, cublas.CUBLAS_FILL_MODE_UPPER, n, x.data.ptr, n,
workspace.data.ptr, buffersize, dev_info.data.ptr)
- else:
- raise ValueError(
- 'dtype must be int32, int64, uint32, uint64, float32, float64,'
- ' complex64 or complex128 (actual: {})'.format(dtype))
status = int(dev_info[0])
if status > 0:
