{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/rasterio/issues/714","repository_url":"https://api.github.com/repos/mapbox/rasterio","labels_url":"https://api.github.com/repos/mapbox/rasterio/issues/714/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/rasterio/issues/714/comments","events_url":"https://api.github.com/repos/mapbox/rasterio/issues/714/events","html_url":"https://github.com/mapbox/rasterio/issues/714","id":155922860,"number":714,"title":"Writing complex data to a GeoTiff file fails silently.","user":{"login":"alexamici","id":226037,"avatar_url":"https://avatars.githubusercontent.com/u/226037?v=3","gravatar_id":"","url":"https://api.github.com/users/alexamici","html_url":"https://github.com/alexamici","followers_url":"https://api.github.com/users/alexamici/followers","following_url":"https://api.github.com/users/alexamici/following{/other_user}","gists_url":"https://api.github.com/users/alexamici/gists{/gist_id}","starred_url":"https://api.github.com/users/alexamici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexamici/subscriptions","organizations_url":"https://api.github.com/users/alexamici/orgs","repos_url":"https://api.github.com/users/alexamici/repos","events_url":"https://api.github.com/users/alexamici/events{/privacy}","received_events_url":"https://api.github.com/users/alexamici/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-20T09:31:02Z","updated_at":"2016-05-20T09:46:32Z","closed_at":null,"body":"I'm on Mac OS X, but reproduced on Linux as well. I see the same result with the rasterio precompiled wheel and recompiling rasterio myself  with `pip install --no-binary :all: rasterio`.\r\n\r\nWhen saving complex data to a new file with driver 'GTiff' the resulting file il filled with garbage.\r\n\r\nRunning:\r\n```\r\nimport numpy as np\r\nimport rasterio\r\n\r\ndata_in_memory = np.ones((2, 2), dtype=rasterio.complex_)\r\nprint(data_in_memory)\r\n\r\nwith rasterio.open(\r\n        'data.tif', 'w', driver='GTiff', width=2, height=2, count=1, dtype=rasterio.complex_\r\n) as destination:\r\n    destination.write(data_in_memory, indexes=1)\r\n\r\nwith rasterio.open('data.tif') as source:\r\n    data_on_disk = source.read(1)\r\n\r\nprint(data_on_disk)\r\n```\r\nReturns:\r\n```\r\n[[ 1.+0.j  1.+0.j]\r\n [ 1.+0.j  1.+0.j]]\r\n[[  2.44029516e-312 +2.22809558e-312j   5.18768928e-322 +0.00000000e+000j]\r\n [  2.44029516e-312 +2.22809558e-312j   2.52517499e-312 +2.41907520e-312j]]\r\n```\r\n\r\nFloat and integer data types work as expected."},"comment":{"url":"https://api.github.com/repos/mapbox/rasterio/issues/comments/220563007","html_url":"https://github.com/mapbox/rasterio/issues/714#issuecomment-220563007","issue_url":"https://api.github.com/repos/mapbox/rasterio/issues/714","id":220563007,"user":{"login":"alexamici","id":226037,"avatar_url":"https://avatars.githubusercontent.com/u/226037?v=3","gravatar_id":"","url":"https://api.github.com/users/alexamici","html_url":"https://github.com/alexamici","followers_url":"https://api.github.com/users/alexamici/followers","following_url":"https://api.github.com/users/alexamici/following{/other_user}","gists_url":"https://api.github.com/users/alexamici/gists{/gist_id}","starred_url":"https://api.github.com/users/alexamici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexamici/subscriptions","organizations_url":"https://api.github.com/users/alexamici/orgs","repos_url":"https://api.github.com/users/alexamici/repos","events_url":"https://api.github.com/users/alexamici/events{/privacy}","received_events_url":"https://api.github.com/users/alexamici/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T09:46:32Z","updated_at":"2016-05-20T09:46:32Z","body":"I tested with `driver='ENVI'` and got garbage as well, so it looks like it's a problem with rasterio handling the complex datatypes, not something format-specific."}}
{"actor":{"display_login":"alexamici"}}