Git Product home page Git Product logo

data_manipulation's People

Contributors

marianocabezas avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

poornasandur

data_manipulation's Issues

TypeError: `pad_width` must be of integral type.

Hi
Getting Error

new_image = np.pad(image, padding, mode='constant', constant_values=0)

(base) D:\newwork\marianocabezas\challenges2018>python test_brats2018.py
Using TensorFlow backend.
�[36m[11:49:32] �[32mTesting the Unet�[0m
2018-11-08 11:49:33.102650: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX
2018-11-08 11:49:33.108934: I tensorflow/core/common_runtime/process_util.cc:69] Creating new thread pool with default inter op setting: 8. Tune using inter_op_parallelism_threads for best performance.
- Loading x
Traceback (most recent call last):
File "test_brats2018.py", line 87, in
main()
File "test_brats2018.py", line 47, in main
verbose=True,
File "D:\newwork\marianocabezas\challenges2018\data_creation.py", line 106, in get_data
x = filter(lambda z: z.any(), get_patches_list(image_names, list_of_centers, patch_size))
File "D:\newwork\marianocabezas\challenges2018\data_creation.py", line 86, in get_patches_list
for image_names, centers in zip(list_of_image_names, centers_list) if centers
File "D:\newwork\marianocabezas\challenges2018\data_creation.py", line 86, in
for image_names, centers in zip(list_of_image_names, centers_list) if centers
File "C:\ProgramData\Miniconda3\lib\site-packages\numpy\core\shape_base.py", line 347, in stack
arrays = [asanyarray(arr) for arr in arrays]
File "C:\ProgramData\Miniconda3\lib\site-packages\numpy\core\shape_base.py", line 347, in
arrays = [asanyarray(arr) for arr in arrays]
File "D:\newwork\marianocabezas\challenges2018\data_creation.py", line 81, in
lambda image: get_patches(norm(np.asarray(load_nii(image).dataobj)), centers, size),
File "D:\newwork\marianocabezas\challenges2018\data_manipulation\generate_features.py", line 111, in get_patches
new_image = np.pad(image, padding, mode='constant', constant_values=0)
File "C:\ProgramData\Miniconda3\lib\site-packages\numpy\lib\arraypad.py", line 1298, in pad
raise TypeError('pad_width must be of integral type.')
TypeError: pad_width must be of integral type.

I get this error after a few minutes.

My python:
(base) D:\newwork\marianocabezas\challenges2018>python
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.