[yt-svn] commit/yt: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Tue May 1 14:47:24 PDT 2012


2 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/3d0f6a0a4e35/
changeset:   3d0f6a0a4e35
branch:      yt
user:        MatthewTurk
date:        2012-05-01 23:46:45
summary:     Somehow I missed these 'return None's
affected #:  1 file

diff -r 78a16256d4679b6ad267352abed15f54f5c2d817 -r 3d0f6a0a4e354f563b7029941866422bce6ca08f yt/convenience.py
--- a/yt/convenience.py
+++ b/yt/convenience.py
@@ -47,13 +47,13 @@
         try:
             import Tkinter, tkFileDialog
         except ImportError:
-            return None
+            raise YTOutputNotIdentified(args, kwargs)
         root = Tkinter.Tk()
         filename = tkFileDialog.askopenfilename(parent=root,title='Choose a file')
         if filename != None:
             return load(filename)
         else:
-            return None
+            raise YTOutputNotIdentified(args, kwargs)
     candidates = []
     args = [os.path.expanduser(arg) if isinstance(arg, types.StringTypes)
             else arg for arg in args]
@@ -79,7 +79,7 @@
                and output_type_registry[n]._is_valid(fn):
                 return output_type_registry[n](fn)
         mylog.error("Couldn't figure out output type for %s", args[0])
-        return None
+        raise YTOutputNotIdentified(args, kwargs)
     mylog.error("Multiple output type candidates for %s:", args[0])
     for c in candidates:
         mylog.error("    Possible: %s", c)



https://bitbucket.org/yt_analysis/yt/changeset/3e1f218938d8/
changeset:   3e1f218938d8
branch:      yt
user:        MatthewTurk
date:        2012-05-01 23:47:14
summary:     Merge
affected #:  1 file

diff -r 3d0f6a0a4e354f563b7029941866422bce6ca08f -r 3e1f218938d83de6a169837549eee92ec0e763a5 yt/visualization/image_writer.py
--- a/yt/visualization/image_writer.py
+++ b/yt/visualization/image_writer.py
@@ -150,6 +150,8 @@
         s1, s2 = bitmap_array.shape[:2]
         alpha_channel = 255*na.ones((s1,s2,1), dtype='uint8')
         bitmap_array = na.concatenate([bitmap_array, alpha_channel], axis=-1)
+    for channel in range(bitmap_array.shape[2]):
+        bitmap_array[:,:,channel] = bitmap_array[:,:,channel].T
     au.write_png(bitmap_array.copy(), filename)
     return bitmap_array

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list